diff options
Diffstat (limited to 'routes/root.js')
-rw-r--r-- | routes/root.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/routes/root.js b/routes/root.js index be3681a..d8e6b55 100644 --- a/routes/root.js +++ b/routes/root.js @@ -5,7 +5,7 @@ import session from "../middlewares/sessions.js"; const router = express.Router(); router.use(session); router.get("/", (req, res) => { - if (session.loggedIn) { + if (req.session.user !== undefined) { return res.redirect(302, "/play"); } return res.redirect(302, "/login"); |