mirror of
https://github.com/umami-software/umami.git
synced 2026-02-19 03:55:37 +01:00
Update scripts/change-password.js
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
This commit is contained in:
parent
bef6dca806
commit
c5b9fc3ddc
1 changed files with 3 additions and 3 deletions
|
|
@ -7,9 +7,9 @@ const prompts = require('prompts');
|
||||||
const prisma = new PrismaClient();
|
const prisma = new PrismaClient();
|
||||||
|
|
||||||
// Function to hash password with bcrypt (replaces imported hashPassword)
|
// Function to hash password with bcrypt (replaces imported hashPassword)
|
||||||
function hashPassword(password) {
|
async function hashPassword(password) {
|
||||||
const salt = bcrypt.genSaltSync(10);
|
const salt = await bcrypt.genSalt(10);
|
||||||
return bcrypt.hashSync(password, salt);
|
return bcrypt.hash(password, salt);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function changePassword() {
|
async function changePassword() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue