private async Task <bool> CreateUserTask(UserTask newUserTask) { var newTask = await _userTaskService.CreateUserTask(newUserTask); UserTasksList.Insert(0, new UserTaskViewModel(newTask, new List <UserTaskTime>())); this.Publish <UserTaskStatusChanged>(); await UpdateRequestedBy(newTask); return(true); }
public async Task <HttpResponseMessage> Post(TodoListInput list) { int id = 0; int.TryParse(User.Identity.Name, out id); await _userTaskService.CreateUserTask(id, list.Name); return(Request.CreateResponse(HttpStatusCode.OK, new TodoListDisplay() { Name = list.Name, Id = id })); }