Esempio n. 1
0
        public async Task <IActionResult> GetItem(Guid id)
        {
            if (id == Guid.Empty)
            {
                return(BadRequest());
            }

            var item = await _toDoItemService.GetItemAsync(id);

            if (item == null)
            {
                return(BadRequest(new { error = "could not edit item" }));
            }
            return(Ok(item));
        }