public ActionResult <Tasky> Edit(int id, [FromBody] Tasky editTask) { try { return(Ok(_ts.Edit(editTask))); } catch (Exception e) { return(BadRequest(e.Message)); } }
public ActionResult <Task> Edit(int id, [FromBody] Task editTask) { try { return(Ok(_LS.Edit(id, editTask))); } catch (System.Exception error) { return(BadRequest(error.Message)); } }
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)); } }