Esempio n. 1
0
        public IActionResult CompleteItem(Guid id)
        {
            var result = new ApiResult <TodoListItem>();

            TodoListItem itemToComplete = _todoListService.CompleteTask(id);

            if (itemToComplete == null)
            {
                result.Message = "Task not Found";
                return(NotFound(result));
            }

            result.Message = "Task Edited Successfully";
            result.Data    = itemToComplete;

            return(Ok(result));
        }