Update scripts/change-password.js

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
This commit is contained in:
Md Irfan Hasan Fahim 2025-05-23 02:55:06 +06:00 committed by GitHub
parent bef6dca806
commit c5b9fc3ddc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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() {