added next() to middleware

This commit is contained in:
Akif9748 2022-04-03 21:09:55 +03:00
parent 4209822c74
commit 1e80da99a8

View file

@ -1,3 +1,4 @@
module.exports = (req, res) => {
module.exports = (req, res,next) => {
if (!req.session.loggedin) return res.redirect('/login');
next();
}