From ce767b57fcb916838be65f317e38c1a54f4f2258 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Wed, 22 Jun 2022 00:38:01 +0200 Subject: Show finished result in join pages. --- server.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'server.js') diff --git a/server.js b/server.js index 4c11ed8..342e9a1 100644 --- a/server.js +++ b/server.js @@ -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) -- cgit v1.2.3