mirror of
https://github.com/umami-software/umami.git
synced 2026-02-19 12:05:41 +01:00
refactor: replace bcrypt with bcryptjs in user management scripts
This commit is contained in:
parent
7a86465239
commit
ea02f66710
5 changed files with 4 additions and 41 deletions
|
|
@ -1,7 +1,7 @@
|
|||
/* eslint-disable no-console */
|
||||
require('dotenv').config();
|
||||
const { PrismaClient } = require('@prisma/client');
|
||||
const bcrypt = require('bcrypt');
|
||||
const bcrypt = require('bcryptjs');
|
||||
const prompts = require('prompts');
|
||||
|
||||
const prisma = new PrismaClient();
|
||||
|
|
@ -39,8 +39,7 @@ async function changePassword() {
|
|||
console.log(`User not found: ${username}`);
|
||||
return;
|
||||
}
|
||||
|
||||
const hash = hashPassword(password);
|
||||
const hash = await hashPassword(password);
|
||||
|
||||
await prisma.user.update({
|
||||
where: { id: user.id },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue