mirror of
https://github.com/sstent/expressmongotest.git
synced 2026-01-25 16:42:00 +00:00
9 lines
159 B
JavaScript
9 lines
159 B
JavaScript
function notLoggedIn(req, res, next) {
|
|
if (req.session.user) {
|
|
res.send('Unauthorized', 401);
|
|
} else {
|
|
next();
|
|
}
|
|
}
|
|
|
|
module.exports = notLoggedIn; |