public ApiResponse <bool> EditWorkTask(int taskId, NewWorkTaskModel task) { task.Valid(); //验证Task参数是否有效 var response = new ApiResponse <bool>() { Result = WorkTaskService.Edit(taskId, task, this.Member) }; return(response); }
public async Task <ActionResult <WorkTask> > Edit([FromBody] WorkTask task) { var res = await _workTaskService.Edit(task); if (res != null) { return(Ok(res)); } else { return(NotFound()); } }