1
0
mirror of https://github.com/Foltik/Shimapan synced 2024-11-13 00:26:55 -05:00
shimapan/app/util/requireAuth.js

7 lines
187 B
JavaScript
Raw Normal View History

2018-07-25 18:45:38 -04:00
exports.requireAuth =
(req, res, next) => {
if (req.isAuthenticated())
next();
else
res.status(401).json({'message:': 'Unauthorized.'});
};