an experiment in putting together a wiki and an object-oriented mud.
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.
|
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 }; |