diff options
Diffstat (limited to 'frontend')
| -rw-r--r-- | frontend/app/routes/golf.$gameId.watch.tsx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/frontend/app/routes/golf.$gameId.watch.tsx b/frontend/app/routes/golf.$gameId.watch.tsx index 83b7a1a..5edf92f 100644 --- a/frontend/app/routes/golf.$gameId.watch.tsx +++ b/frontend/app/routes/golf.$gameId.watch.tsx @@ -25,6 +25,11 @@ export async function loader({ params, request }: LoaderFunctionArgs) { }; const [game, sockToken] = await Promise.all([fetchGame(), fetchSockToken()]); + + if (game.game_type !== "1v1") { + return new Response("Not Found", { status: 404 }); + } + return { game, sockToken, |
