Issue fixes (#413)
* Auto lookup missing airports closes #404 * Ensure flight ICAOs are capitalized closes #404 * Update htaccess in root closes #412 * Update htaccess in root closes #412 * StyleCI fix
This commit is contained in:
@@ -53,11 +53,17 @@ class FlightService extends Service
|
||||
*/
|
||||
public function createFlight($fields)
|
||||
{
|
||||
$fields['dpt_airport_id'] = strtoupper($fields['dpt_airport_id']);
|
||||
$fields['arr_airport_id'] = strtoupper($fields['arr_airport_id']);
|
||||
|
||||
$flightTmp = new Flight($fields);
|
||||
if ($this->isFlightDuplicate($flightTmp)) {
|
||||
throw new DuplicateFlight($flightTmp);
|
||||
}
|
||||
|
||||
$this->airportSvc->lookupAirportIfNotFound($fields['dpt_airport_id']);
|
||||
$this->airportSvc->lookupAirportIfNotFound($fields['arr_airport_id']);
|
||||
|
||||
$fields = $this->transformFlightFields($fields);
|
||||
$flight = $this->flightRepo->create($fields);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user