From c5b9fc3ddceda61874437e2df9016bc31db7d608 Mon Sep 17 00:00:00 2001 From: Md Irfan Hasan Fahim <81842071+mihf05@users.noreply.github.com> Date: Fri, 23 May 2025 02:55:06 +0600 Subject: [PATCH] Update scripts/change-password.js Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> --- scripts/change-password.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/change-password.js b/scripts/change-password.js index ec88f606c..44a1aec9c 100644 --- a/scripts/change-password.js +++ b/scripts/change-password.js @@ -7,9 +7,9 @@ const prompts = require('prompts'); const prisma = new PrismaClient(); // Function to hash password with bcrypt (replaces imported hashPassword) -function hashPassword(password) { - const salt = bcrypt.genSaltSync(10); - return bcrypt.hashSync(password, salt); +async function hashPassword(password) { + const salt = await bcrypt.genSalt(10); + return bcrypt.hash(password, salt); } async function changePassword() {