diff --git a/app.js b/app.js index 677c2fb..8e9dd77 100644 --- a/app.js +++ b/app.js @@ -67,10 +67,6 @@ app.get('/aboutUs', (req, res) => { return res.status(status.Ok); }); -app.get('/logout', (req, res) => { - req.session.destroy(); - return res.redirect('/login'); -}); // Initialize database and start app initDatabase().then(() => { diff --git a/src/auth/authentication.js b/src/auth/authentication.js index e680fb3..b58977f 100644 --- a/src/auth/authentication.js +++ b/src/auth/authentication.js @@ -16,7 +16,7 @@ module.exports = (users) => { }); router.post("/login", async (req, res) => { - + const credentialSchema = joi.object({ email: joi.string().email().required(), password: joi.string().max(20).required(),