mirror of
https://github.com/Foltik/Shimapan
synced 2024-11-10 15:48:27 -05:00
7 lines
187 B
JavaScript
7 lines
187 B
JavaScript
exports.requireAuth =
|
|
(req, res, next) => {
|
|
if (req.isAuthenticated())
|
|
next();
|
|
else
|
|
res.status(401).json({'message:': 'Unauthorized.'});
|
|
}; |