Fixed some bugs with the validation of the end of match requests.

Forgot to change the false of the Authorize() method.

Fixed comparison of Match creator and user that send teh request.
To compare objects don't use ===, use == instead.
This commit is contained in:
Vari
2024-03-06 18:22:22 +01:00
parent 48225057f8
commit a5823b3e0e
4 changed files with 10 additions and 8 deletions

View File

@@ -76,7 +76,7 @@ public function executeChallengeProgressionBatch(ExecuteChallengeProgressionBatc
// Only allow the saving of challenge progress if the request comes from the same user as from the
// game the request is coming from.
if($user !== $foundGame->creator)
if($user != $foundGame->creator)
throw new AuthorizationException('Not allowed to save progress');
$progressUser = User::find($request->userId);