public async Task <TodoDto> GetTodo(int todoId) { var todo = _todoManager.GetTodo(todoId); var model = todo.MapTo <TodoDto>(); await ProcessResponsible(model, todo.ResponsibleId); ProcessFiles(model); ProcessDiscussion(model); ProcessStatus(model); return(model); }
public ActionResult <string> Get(int id) { TodoItem x = todoManager.GetTodo(id); if (x == null) { return("not found"); } return(x.Title); }
public async Task <ActionResult <TodoDTO> > Get(int id) { var todo = await _todos.GetTodo(id, GetuserId()); if (todo == null) { return(NotFound()); } return(todo); }