fix/session check fixed

This commit is contained in:
nicoagostini committed 2025-05-05 18:59:59 -07:00
1 parent fef7184404
commit f39b8555fa
2 files changed
+6 -4

No files matched your search

+6
View File
@@ -13,6 +13,12 @@ module.exports = (users) => {
});
router.post("/login", async (req, res) => {
if (req.session.authenticated) {
res.redirect("/home");
return res.status(status.Ok);
}
const credentialSchema = joi.object({
email: joi.string().email().required(),
password: joi.string().max(20).required(),