mongodb
This commit is contained in:
parent
90f46467dd
commit
72b7f656d6
1 changed files with 2 additions and 2 deletions
|
@ -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 = {
|
||||
|
|
Loading…
Reference in a new issue