Call the AwardListener in the proper UserStatsChanged event #155

This commit is contained in:
Nabeel Shahzad
2018-03-17 12:55:50 -05:00
parent 3c39aeee43
commit 67ef6872af
6 changed files with 90 additions and 12 deletions

View File

@@ -285,8 +285,6 @@ class PirepService extends BaseService
$pirep->save();
$pirep->refresh();
$this->setPilotState($pilot, $pirep);
Log::info('PIREP ' . $pirep->id . ' state change to ACCEPTED');
# Update the aircraft
@@ -300,6 +298,7 @@ class PirepService extends BaseService
# Any ancillary tasks before an event is dispatched
$this->removeBid($pirep);
$this->setPilotState($pilot, $pirep);
event(new PirepAccepted($pirep));
return $pirep;