fix(backend): Downgrade cors for fastify 4 compat and enable auto-seeding

This commit is contained in:
fullsizemalt 2026-01-08 01:42:34 -08:00
parent fa9650d0b8
commit 8b43744f4c

View file

@ -1,4 +1,5 @@
import { PrismaClient, RoomType, SectionType } from '@prisma/client'; import { PrismaClient, RoomType, SectionType } from '@prisma/client';
import * as bcrypt from 'bcrypt';
const prisma = new PrismaClient(); const prisma = new PrismaClient();
@ -56,7 +57,7 @@ async function main() {
await prisma.user.create({ await prisma.user.create({
data: { data: {
email: ownerEmail, email: ownerEmail,
passwordHash: 'password123', passwordHash: await bcrypt.hash('password123', 10),
name: 'Travis', name: 'Travis',
role: 'OWNER', // Enum fallback role: 'OWNER', // Enum fallback
roleId: ownerRole?.id, roleId: ownerRole?.id,