From 89e0aa0fdc97def6eda2763577fe44c8dc8ed108 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Munsch?= Date: Tue, 19 Dec 2023 12:55:37 +0100 Subject: [PATCH] CheckGameStatus middleware add use case game will begun but has no teaser as default hanlding redirect to page --- app/Http/Middleware/CheckGameStatus.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Http/Middleware/CheckGameStatus.php b/app/Http/Middleware/CheckGameStatus.php index b9c69af..5265286 100644 --- a/app/Http/Middleware/CheckGameStatus.php +++ b/app/Http/Middleware/CheckGameStatus.php @@ -31,7 +31,8 @@ class CheckGameStatus $settings->game_has_ended => redirect($settings->redirect_close), // * Game has started $settings->game_has_begun => $next($request), - default => throw new \RuntimeException('Unhandled game state') + // * The game will begun, but has no teaser activated. + default => redirect($settings->redirect_close) }; } }