diff options
Diffstat (limited to 'auth/index.js')
-rw-r--r-- | auth/index.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/auth/index.js b/auth/index.js index 3ef330d..45b26f3 100644 --- a/auth/index.js +++ b/auth/index.js @@ -10,7 +10,7 @@ function checkUser(req, res, next) { } function checkAdmin(req, res, next) { - if (!req.session.loggedIn) res.redirect("/auth"); + if (!req.session.loggedIn) return res.redirect("/auth"); try { db.query("SELECT is_admin FROM users WHERE id = ?", [req.session.uid]).then((ret) => { |