I am facing a confusion with EJS. When I make a post request, EJS renders my CSS properly. However, when I try the following code snippet:
exports.resetpassword = async (req, res) => {
const {id, token} = req.params;
const user = await LoginModel.findById(id).exec();
const secret = process.env.TOKEN_SECRET + user.password
try {
const payload = jwt.verify(token, secret)
req.flash('emailReseter', `${user.email}`);
res.render("resetpassword.ejs", {messageMail: req.flash("emailReseter")});
} catch (error) {
console.log(error.message);
}
};
Here's the issue I encounter:
https://i.sstatic.net/D6qSf.png
My CSS file is not applied and I can't figure out the root of the problem.
All my other EJS files are similar, except for the head link, and they apply the CSS correctly.