You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
10 lines
274 B
10 lines
274 B
2 weeks ago
|
function loginRequired(req, res, next) {
|
||
|
console.log("checkinig on req.session for auhetnticaion: ", req.session);
|
||
|
if (!req.session.name) {
|
||
|
return res.status(401).json({"error": "need to be logged in for that bucko"});
|
||
|
}
|
||
|
|
||
|
next();
|
||
|
}
|
||
|
|
||
|
module.exports = { loginRequired };
|