8 lines
No EOL
194 B
JavaScript
8 lines
No EOL
194 B
JavaScript
function sessionCheck(req, res, next) {
|
|
if (!req.session.user || !req.cookies.userSId)
|
|
res.redirect("/login");
|
|
else
|
|
next();
|
|
}
|
|
|
|
module.exports.sessionCheck = sessionCheck; |