|
|
@@ -45,21 +45,21 @@ module.exports = mongoose.connection;
|
|
|
// });
|
|
|
// resto.save();
|
|
|
|
|
|
-// const salt = bcrypt.genSaltSync(12);
|
|
|
-// password = bcrypt.hashSync('Pass@123', 12);
|
|
|
-// console.log('fgfg', password);
|
|
|
-// let date = new Date(1997, 1 , 12 , 20, 40);
|
|
|
+const salt = bcrypt.genSaltSync(12);
|
|
|
+ password = bcrypt.hashSync('Pass@123', 12);
|
|
|
+ console.log('fgfg', password);
|
|
|
+let date = new Date(1997, 1 , 12 , 20, 40);
|
|
|
|
|
|
-// const user = new User({
|
|
|
-// firstname: " adrien",
|
|
|
-// lastname: "xxxxxxx",
|
|
|
-// email: "adrien@hotmail.fr",
|
|
|
-// role: 'admin',
|
|
|
-// birthday: date,
|
|
|
-// phonenumber: '0680705876',
|
|
|
-// isActive: true,
|
|
|
-// password: password
|
|
|
-// });
|
|
|
+ const user = new User({
|
|
|
+ firstname: " adrien",
|
|
|
+ lastname: "xxxxxxx",
|
|
|
+ email: "adrien@hotmail.fr",
|
|
|
+ role: 'admin',
|
|
|
+ birthday: date,
|
|
|
+ phonenumber: '0680705876',
|
|
|
+ isActive: true,
|
|
|
+ password: password
|
|
|
+ });
|
|
|
|
|
|
|
|
|
-// user.save();
|
|
|
+ user.save();
|