Fix issue with being unable to save pirep edits (#1116)

Fixes issue being unable to save pirep edits from the admin section due to incorrect variable being used
This commit is contained in:
Andrew Roberts 2021-03-31 16:03:01 +01:00 committed by GitHub
parent 50e8f2e52b
commit 3f84f84309
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -15,7 +15,7 @@ class UpdatePirepRequest extends FormRequest
*/ */
public function authorize(): bool public function authorize(): bool
{ {
$pirep = Pirep::findOrFail($this->route('id'), ['user_id']); $pirep = Pirep::findOrFail($this->route('pirep'), ['user_id']);
return $pirep->user_id === Auth::id(); return $pirep->user_id === Auth::id();
} }