summaryrefslogtreecommitdiff
path: root/server.js
diff options
context:
space:
mode:
Diffstat (limited to 'server.js')
-rw-r--r--server.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/server.js b/server.js
index df93c70..115f2d5 100644
--- a/server.js
+++ b/server.js
@@ -1355,9 +1355,10 @@ app.get('/play/:game_id', function (req, res) {
if (!title)
return res.redirect('/join/'+game_id);
let role = SQL_SELECT_PLAYER_ROLE.get(game_id, user_id);
- if (!role)
- role = "Observer";
- res.redirect('/'+title+'/play:'+game_id+':'+role);
+ if (role)
+ res.redirect('/'+title+'/play:'+game_id+':'+role);
+ else
+ res.redirect('/'+title+'/play:'+game_id);
});
app.get('/:title_id/play\::game_id\::role', must_be_logged_in, function (req, res) {