mirror of
https://github.com/Foltik/Shimapan
synced 2024-11-13 00:26:55 -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.'});
|
||
|
};
|