Exemplo n.º 1
0
        public async Task <IActionResult> Delete([FromRoute] Guid shiftId)
        {
            bool deleted = await _shiftService.DeleteShiftAsync(shiftId);

            // NOTE:    If succesfully deleted, return NoContent to display that there is no longer any content.
            //          It could be considered to store the shift and display that this was the shift that was deleted.
            if (deleted)
            {
                return(StatusCode(StatusCodes.Status204NoContent, "Shift successfully deleted!"));
            }
            return(NotFound());
        }