Example #1
0
        public async Task <IActionResult> Archive(int id)
        {
            // Guards
            var existingItem = await _todoService.GetByIdAsync(id);

            if (existingItem == null)
            {
                return(NotFound());
            }

            // Update logic
            _todoService.Archive(id);

            // Return update ok result
            return(NoContent());
        }