|
@ -20,6 +20,14 @@ public class Admin extends Person{ |
|
|
return aircraft; |
|
|
return aircraft; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public String searchAircraft(String name){ |
|
|
|
|
|
String aircraftDetails = aircraftRepository.findAircraftByAircraftName(name); |
|
|
|
|
|
if(aircraftDetails.isBlank()){ |
|
|
|
|
|
throw new RuntimeException("Aircraft does not exist."); |
|
|
|
|
|
} |
|
|
|
|
|
return aircraftDetails; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
public String searchFlights(String flightNumber){ |
|
|
public String searchFlights(String flightNumber){ |
|
|
String flightDetails = flightRepository.findFlightByFlightNumber(flightNumber); |
|
|
String flightDetails = flightRepository.findFlightByFlightNumber(flightNumber); |
|
|
if(flightDetails.isBlank()){ |
|
|
if(flightDetails.isBlank()){ |
|
|