From b4dbddb3e666b6d60e39500e6b31c375b1dd755d Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Sun, 5 Jan 2025 12:31:28 +0100 Subject: Allow admin to force-start games. --- server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.js b/server.js index 1346de1..78d437a 100644 --- a/server.js +++ b/server.js @@ -2086,7 +2086,7 @@ function assign_random_roles(game, options, players) { app.post("/api/start/:game_id", must_be_logged_in, function (req, res) { let game_id = req.params.game_id | 0 let game = SQL_SELECT_GAME.get(game_id) - if (game.owner_id !== req.user.user_id) + if (req.user.user_id !== game.owner_id && req.user.user_id !== 1) return res.send("Not authorized to start that game ID.") if (game.status !== STATUS_OPEN) return res.send("The game is already started.") -- cgit v1.2.3