Пример #1
0
        public async Task <IActionResult> CancelFlight(int id)
        {
            await _service.CancelFlight(id);

            await _signalrHub.Clients.All.SendAsync("LoadFlights");

            return(RedirectToAction(nameof(Index)));
        }
Пример #2
0
        public async Task <ActionResult> CancelFlight(int transactionID)
        {
            SaveStatus status = await _flightRepo.CancelFlight(transactionID);

            if (status == SaveStatus.Success)
            {
                return(Ok());
            }
            else
            {
                return(StatusCode(500));
            }
        }