Move the prefile event and add a new error exception (#1111)

* Move the prefile event and add a new error exception

* Remove extra import

* Add empty handler for testing

* Fix styling

* Fix styleci
This commit is contained in:
Nabeel S
2021-03-29 14:53:35 -04:00
committed by GitHub
parent ed146b2c70
commit 9c4aced837
5 changed files with 78 additions and 3 deletions

View File

@@ -6,6 +6,7 @@ use App\Contracts\Service;
use App\Events\PirepAccepted;
use App\Events\PirepCancelled;
use App\Events\PirepFiled;
use App\Events\PirepPrefiled;
use App\Events\PirepRejected;
use App\Events\UserStatsChanged;
use App\Exceptions\AircraftInvalid;
@@ -151,6 +152,8 @@ class PirepService extends Service
}
}
event(new PirepPrefiled($pirep));
$pirep->save();
return $pirep;