Matches almost done still refining

This commit is contained in:
2026-01-02 21:45:37 +00:00
parent b9df0a4d4a
commit c3f8c3fff0
9 changed files with 468 additions and 30 deletions
+5 -7
View File
@@ -86,7 +86,6 @@ class GamePolicy
return true;
}
/**
* Determine whether the user can update the model.
*/
@@ -96,17 +95,16 @@ class GamePolicy
return false;
}
if (
$game->status !== "Playing" ||
($game->player1_user_id !== $user->id &&
$game->player2_user_id !== $user->id)
) {
if (!in_array($game->status, ['Playing', 'Pending'])) {
return false;
}
if ($game->player1_user_id !== $user->id && $game->player2_user_id !== $user->id) {
return false;
}
return true;
}
/**
* Determine whether the user can delete the model.
*/