This commit is contained in:
clement callaert 2023-11-04 18:22:38 +01:00
parent 90f46467dd
commit 72b7f656d6

View file

@ -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 = {