예제 #1
0
 public ActionResult <Models.Ticket> DeleteTicket(int ticketId)
 {
     try
     {
         return(Ok(new OkResponse <Models.Ticket>(_ticket.DeleteTicket(ticketId))));
     }
     catch (TicketNotFoundException e)
     {
         return(NotFound(e.Message));
     }
     catch (Exception e)
     {
         return(BadRequest(new ErrorResponse(e.Message, new List <string>()
         {
             "ticketId"
         })));
     }
 }