public IActionResult IsDoneItem(Guid id, bool isDone) { var item = _toDoItemService.Get(c => c.Id == id).Data; item.isDone = isDone; _toDoItemService.Update(item); return(Ok()); }
public async Task <IActionResult> GetItem(Guid id) { if (id == Guid.Empty) { return(BadRequest()); } var item = await _toDoItemService.Get(id); if (item == null) { return(BadRequest( new { error = "Could retrieve this item" })); } return(Ok(item)); }