Seed com hash pre-calculado (sem dependencia bcryptjs)
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import { PrismaClient } from '@prisma/client';
|
||||
import bcrypt from 'bcryptjs';
|
||||
|
||||
const prisma = new PrismaClient();
|
||||
|
||||
@@ -8,8 +7,8 @@ async function main() {
|
||||
|
||||
// 1. Criar usuário admin
|
||||
const email = 'admin@occto.com';
|
||||
const password = 'admin';
|
||||
const hashedPassword = await bcrypt.hash(password, 10);
|
||||
// Hash bcrypt pré-calculado para senha 'admin' com custo 10
|
||||
const hashedPassword = '$2b$10$V/OWy/6bl9VLr5suXil66.shPIwyOJEi8GLHbpW.euHYAggy8akJ.';
|
||||
|
||||
const user = await prisma.user.upsert({
|
||||
where: { email },
|
||||
|
||||
Reference in New Issue
Block a user