From 9f15c3ff1a269810cbedc08601508c29e4d9bd86 Mon Sep 17 00:00:00 2001 From: omkieit Date: Tue, 5 Nov 2024 17:05:00 +0530 Subject: [PATCH] done --- ef-api/index.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/ef-api/index.js b/ef-api/index.js index 8405324..eea8fb6 100644 --- a/ef-api/index.js +++ b/ef-api/index.js @@ -9,8 +9,8 @@ import propertyRouter from "./routes/property.js"; import mysqlRouter from "./routes/mysqlproperty.js"; import adminRouter from "./routes/admin.js" import dotenv from "dotenv"; -import bcrypt from "bcryptjs"; -import adminModal from "./models/admin.js"; +// import bcrypt from "bcryptjs"; +// import adminModal from "./models/admin.js"; const app = express(); dotenv.config(); @@ -70,13 +70,13 @@ dbConnectionPromise }); - const createAdminUser = async () => { - const hashedPassword = await bcrypt.hash("Uer$99#KKma-hi19", 10); - const admin = new adminModal({ username: "admin", password: hashedPassword }); - await admin.save(); - console.log("Admin user created.", admin); - mongoose.disconnect(); - }; + // const createAdminUser = async () => { + // const hashedPassword = await bcrypt.hash("Uer$99#KKma-hi19", 10); + // const admin = new adminModal({ username: "admin", password: hashedPassword }); + // await admin.save(); + // console.log("Admin user created.", admin); + // mongoose.disconnect(); + // }; - createAdminUser(); + // createAdminUser();