public async Task <IActionResult> Put(string number, [FromBody] FlightDto dto) { try { await _flightsService.UpdateAsync(number, dto); return(Ok()); } catch (NotExistException) { return(NotFound()); } catch (ValidationException ex) { return(BadRequest(ex.Errors)); } catch (NullBodyException) { return(BadRequest()); } }