예제 #1
0
        public IActionResult AmendTicket(int id, int numberOfNewLines)
        {
            if (!_ticketRepository.TicketExists(id))
            {
                return NotFound();
            }

            if (_ticketRepository.HasStatusBeenChecked(id))
            {
                return Content("This ticket cannot be amended - it's status has already been checked");
            }
            
            var amndedTicket =  _ticketRepository.AmendTicket(id, numberOfNewLines);          

            return NoContent();
        }