diff options
| author | nsfisis <nsfisis@gmail.com> | 2024-08-05 03:06:21 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2024-08-05 03:06:33 +0900 |
| commit | 63d65d60fc121d6dfc2cdb6a2e23462a989880e0 (patch) | |
| tree | 0a800730571779278da22185c159663a386d7e8e | |
| parent | db6207a42296867d73ce5e960ee8542f84be3ebe (diff) | |
| download | iosdc-japan-2024-albatross-63d65d60fc121d6dfc2cdb6a2e23462a989880e0.tar.gz iosdc-japan-2024-albatross-63d65d60fc121d6dfc2cdb6a2e23462a989880e0.tar.zst iosdc-japan-2024-albatross-63d65d60fc121d6dfc2cdb6a2e23462a989880e0.zip | |
feat(frontend): disallow to access watch page in multiplayer mode
| -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, |
