Don't allow cancels from certain states (#396)
* Don't allow cancels from certain states * Unused imports * Don't reset the state doubly * Move SetUserActive into listener; code cleanup * Unused imports * Add missing files into htaccess * Move Command contract to correct folder
This commit is contained in:
@@ -363,10 +363,8 @@ class PirepController extends Controller
|
||||
{
|
||||
Log::info('PIREP Cancel, user '.Auth::id(), $request->post());
|
||||
|
||||
$pirep = $this->pirepRepo->update([
|
||||
'state' => PirepState::CANCELLED,
|
||||
'status' => PirepStatus::CANCELLED,
|
||||
], $pirep_id);
|
||||
$pirep = Pirep::find($pirep_id);
|
||||
$this->pirepSvc->cancel($pirep);
|
||||
|
||||
return new PirepResource($pirep);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user