Fix issue where user stats aren't incremented on PIREP auto accept (#335)

* Fix issue where user stats aren't incremented on PIREP auto accept

* Formatting
This commit is contained in:
Nabeel S
2019-08-01 15:23:59 -04:00
committed by GitHub
parent 63485d5a0f
commit 95147e31bf
9 changed files with 79 additions and 18 deletions

View File

@@ -279,7 +279,7 @@ class PirepController extends Controller
// Can they fly this aircraft?
if (setting('pireps.restrict_aircraft_to_rank', false)
&& !$this->userSvc->aircraftAllowed(Auth::user(), $pirep->aircraft_id)) {
Log::info('Pilot ' . Auth::user()->id . ' not allowed to fly aircraft');
Log::info('Pilot '.Auth::user()->id.' not allowed to fly aircraft');
return $this->flashError(
'You are not allowed to fly this aircraft!',
'frontend.pireps.create'
@@ -290,7 +290,7 @@ class PirepController extends Controller
/* @noinspection NotOptimalIfConditionsInspection */
if (setting('pireps.only_aircraft_at_dpt_airport')
&& $pirep->aircraft_id !== $pirep->dpt_airport_id) {
Log::info('Aircraft ' . $pirep->aircraft_id . ' not at departure airport '.$pirep->dpt_airport_id.', erroring out');
Log::info('Aircraft '.$pirep->aircraft_id.' not at departure airport '.$pirep->dpt_airport_id.', erroring out');
return $this->flashError(
'This aircraft is not positioned at the departure airport!',
'frontend.pireps.create'