diff options
Diffstat (limited to 'middlewares/requireAuth.js')
-rw-r--r-- | middlewares/requireAuth.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/middlewares/requireAuth.js b/middlewares/requireAuth.js index 3cf10ec..7e74339 100644 --- a/middlewares/requireAuth.js +++ b/middlewares/requireAuth.js @@ -1,5 +1,5 @@ function requireAuth(req, res, next) { - if (req.session.userId) { + if (req.session.user !== undefined) { next(); } res.redirect(302, "/login"); |