diff --git a/middlewares/auth.js b/middlewares/auth.js index 44be282..be587cf 100644 --- a/middlewares/auth.js +++ b/middlewares/auth.js @@ -27,12 +27,12 @@ export const isAuthenticatedUser = async (req, res, next) => { // console.log(frontdecoded); const fuser = await User.findById(frontdecoded.id); // console.log(fuser); - // if (!fuser) { - // return res.status(404).json({ - // success: false, - // message: "User not found", - // }); - // } + if (!fuser) { + return res.status(404).json({ + success: false, + message: "User not found", + }); + } req.user = fuser; next();