public async Task <ActionResult <Airport> > UpdateAirportById([FromBody] UpdateAirportRequest airport, int id) { var updated = await _airportService.UpdateAirportByIdAsync(id, airport); return(Ok(new { status = 200, data = updated, message = "Airport updated!" })); }
public async Task <ActionResult <Airport> > CreateAirport([FromBody] UpdateAirportRequest airport) { var created = await _airportService.CreateAirportAsync(airport); return(Ok(new { status = 200, data = created, message = "Airport created!" })); }