summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2021-07-07 16:29:19 +0200
committerTor Andersson <tor@ccxvii.net>2021-07-07 16:29:19 +0200
commit51dc768d9daa7216fede2ac7eb9bfd4643d77a52 (patch)
tree9115576d80d54d1f353f4df5288b4f81d6ab6d61
parente1ba80b1b7561f50c71d4ec45912eb39f438b511 (diff)
downloadserver-51dc768d9daa7216fede2ac7eb9bfd4643d77a52.tar.gz
Add missing 'return' statement.
-rw-r--r--server.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/server.js b/server.js
index 6d036e7..49a97d0 100644
--- a/server.js
+++ b/server.js
@@ -944,7 +944,7 @@ app.get('/play/:game_id', must_be_logged_in, function (req, res) {
return res.redirect('/join/'+game_id);
let role = QUERY_ROLE_FROM_GAME_AND_USER.get(game_id, user_id);
if (!role)
- res.redirect('/'+title+'/play.html?game='+game_id+'&role=Observer');
+ return res.redirect('/'+title+'/play.html?game='+game_id+'&role=Observer');
return res.redirect('/'+title+'/play.html?game='+game_id+'&role='+role);
} catch (err) {
req.flash('message', err.toString());