From 72b7f656d6a0f184ff0b35f8a85992767b89d916 Mon Sep 17 00:00:00 2001 From: clement callaert Date: Sat, 4 Nov 2023 18:22:38 +0100 Subject: [PATCH] mongodb --- routes/auth.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/routes/auth.js b/routes/auth.js index fe9bd18..2b85961 100644 --- a/routes/auth.js +++ b/routes/auth.js @@ -62,7 +62,7 @@ router.post('/creer-compte', async function (req, res) { console.log("here2") const existingUser = await db.getDb().collection('users').findOne({email: enteredEmail}) || db.getDb().collection('users').findOne({nom_dutilisateur: enteredNom_dutilisateur}); - + console.log(existingUser) if (existingUser) { req.session.inputData = { hasError: true, @@ -80,7 +80,7 @@ router.post('/creer-compte', async function (req, res) { }); return; } - + console.log("here3") const hashedPassword = await bcrypt.hash(enteredPassword, 12); const user = {