Ejemplo n.º 1
0
 public ActionResult <Tasky> Edit(int id, [FromBody] Tasky editTask)
 {
     try
     {
         return(Ok(_ts.Edit(editTask)));
     }
     catch (Exception e)
     {
         return(BadRequest(e.Message));
     }
 }
Ejemplo n.º 2
0
 public ActionResult <Task> Edit(int id, [FromBody] Task editTask)
 {
     try
     {
         return(Ok(_LS.Edit(id, editTask)));
     }
     catch (System.Exception error)
     {
         return(BadRequest(error.Message));
     }
 }
Ejemplo n.º 3
0
        public async Task <ActionResult <MyTask> > Edit(int id, [FromBody] MyTask editTask)
        {
            try
            {
                Profile userInfo = await HttpContext.GetUserInfoAsync <Profile>();

                editTask.Id = id;
                return(Ok(_ts.Edit(editTask, userInfo.Id)));
            }
            catch (Exception err)
            {
                return(BadRequest(err.Message));
            }
        }