From 9287a9f30af221670b844101e846840cfad3a966 Mon Sep 17 00:00:00 2001 From: SIMAILA Djalim Date: Mon, 16 Jan 2023 08:53:56 +0100 Subject: [PATCH] lobby redirect to / if no gameid was given --- truthseeker/routes/routes_ui.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/truthseeker/routes/routes_ui.py b/truthseeker/routes/routes_ui.py index 2e5d7d9..c32316d 100644 --- a/truthseeker/routes/routes_ui.py +++ b/truthseeker/routes/routes_ui.py @@ -22,10 +22,17 @@ def licenses(): def legal(): return flask.render_template("legal.html") +@routes_ui.route("/lobby") +def lobbyRedirect(): + return flask.redirect("/") + @routes_ui.route("/lobby/") def lobby(game_id): # rendered by the javascript client-side + print(game_id) + if game_id is None: + return flask.redirect("") return flask.render_template("lobby.html", gameid=game_id)