akf-forum/middlewares/login.js

4 lines
115 B
JavaScript
Raw Normal View History

2022-04-06 21:14:46 +03:00
module.exports = (req, res, next) => {
if (!req.session.userid) return res.redirect('/login');
2022-04-03 21:09:55 +03:00
next();
2022-04-03 21:01:55 +03:00
}