diff options
author | Tor Andersson <tor@ccxvii.net> | 2022-06-22 00:38:01 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2022-06-22 00:38:18 +0200 |
commit | ce767b57fcb916838be65f317e38c1a54f4f2258 (patch) | |
tree | 4e1140efc618b4e3caf6f3d2f87a1db32ebe8f04 /server.js | |
parent | 598313adbd56d342e47093e14b510a70eb6235a7 (diff) | |
download | server-ce767b57fcb916838be65f317e38c1a54f4f2258.tar.gz |
Show finished result in join pages.
Diffstat (limited to 'server.js')
-rw-r--r-- | server.js | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -1287,7 +1287,13 @@ app.get('/join/:game_id', must_be_logged_in, function (req, res) { let game = SQL_SELECT_GAME_VIEW.get(game_id) if (!game) return res.status(404).send("Invalid game ID.") - annotate_game(game, req.user.user_id) + + let options = JSON.parse(game.options) + if (game.options === '{}') + game.human_options = "None" + else + game.human_options = format_options(options) + let roles = get_game_roles(game.title_id, game.scenario, game.options) let players = SQL_SELECT_PLAYERS_JOIN.all(game_id) let ready = (game.status === 0) && is_game_ready(game.title_id, game.scenario, game.options, players) |