Archived
1
0
Fork 0
This repository has been archived on 2024-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
kfet/routes/middleware.js

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;