summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2025-01-05 12:31:28 +0100
committerTor Andersson <tor@ccxvii.net>2025-01-05 12:31:38 +0100
commitb4dbddb3e666b6d60e39500e6b31c375b1dd755d (patch)
tree32dad64ad15ff7168762a15f170dc6063111fcf1
parent8dcb2dc58a407feea03373334bf2810f029d160a (diff)
downloadserver-b4dbddb3e666b6d60e39500e6b31c375b1dd755d.tar.gz
Allow admin to force-start games.HEADmaster
-rw-r--r--server.js2
1 files changed, 1 insertions, 1 deletions
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.")