Seed com hash pre-calculado (sem dependencia bcryptjs)

This commit is contained in:
Erik
2025-11-26 15:24:32 -03:00
parent c8da32e279
commit 71e7106023

View File

@@ -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 },