public async Task <IActionResult> CancelFlight(int id) { await _service.CancelFlight(id); await _signalrHub.Clients.All.SendAsync("LoadFlights"); return(RedirectToAction(nameof(Index))); }
public async Task <ActionResult> CancelFlight(int transactionID) { SaveStatus status = await _flightRepo.CancelFlight(transactionID); if (status == SaveStatus.Success) { return(Ok()); } else { return(StatusCode(500)); } }