From 74dcf9f0044dbd176cb3d8b392d60ef7f1439ac8 Mon Sep 17 00:00:00 2001 From: clement callaert Date: Sat, 4 Nov 2023 20:14:41 +0100 Subject: [PATCH] mongodb --- routes/auth.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/routes/auth.js b/routes/auth.js index fb64110..ea443f1 100644 --- a/routes/auth.js +++ b/routes/auth.js @@ -60,9 +60,7 @@ router.post('/creer-compte', async function (req, res) { return; } 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.toArray()) + const existingUser = await db.getDb().collection('users').findOne({email: enteredEmail}); if (existingUser) { console.log("here4") req.session.inputData = {