fix(backend): Downgrade cors for fastify 4 compat and enable auto-seeding
This commit is contained in:
parent
fa9650d0b8
commit
8b43744f4c
1 changed files with 2 additions and 1 deletions
|
|
@ -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,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue