1
0
mirror of https://github.com/Foltik/Shimapan synced 2024-11-10 15:48:27 -05:00
shimapan/app/util/requireAuth.js

7 lines
187 B
JavaScript

exports.requireAuth =
(req, res, next) => {
if (req.isAuthenticated())
next();
else
res.status(401).json({'message:': 'Unauthorized.'});
};