Yash Goyal
Correction
2070fe3
raw
history blame contribute delete
210 Bytes
const isAuthenticated = (req, res, next) => {
if (req.isAuthenticated()) {
return next();
}
res.status(401).json({ message: 'Unauthorized. Please log in.' });
};
module.exports = { isAuthenticated };