| Current Path : /var/www/recommendations/www/library/ |
| Current File : /var/www/recommendations/www/library/checkAuth.js |
function checkAuth(req, res, next) {
const token = req.headers.authorization;
if (token !== process.env.SYSTEM_BEARERTOKEN) {
return res.status(401).json({ message: 'Unauthorized access' });
}
next();
}
module.exports = {
checkAuth
};