Skip to content

Commit

Permalink
fix(be): fix admin user profile seed (#2013)
Browse files Browse the repository at this point in the history
  • Loading branch information
jimin9038 authored Aug 26, 2024
1 parent eb22b9f commit 9b2cbbe
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion apps/backend/prisma/seed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ const MIN_DATE: Date = new Date('2000-01-01T00:00:00.000Z')
const MAX_DATE: Date = new Date('2999-12-31T00:00:00.000Z')

let superAdminUser: User
let adminUser: User
let managerUser: User
let publicGroup: Group
let privateGroup: Group
Expand Down Expand Up @@ -57,7 +58,7 @@ const createUsers = async () => {
})

// create admin user
await prisma.user.create({
adminUser = await prisma.user.create({
data: {
username: 'admin',
password: await hash('Adminadmin'),
Expand Down Expand Up @@ -107,6 +108,13 @@ const createUsers = async () => {
}
})

await prisma.userProfile.create({
data: {
userId: adminUser.id,
realName: 'Admin Kim'
}
})

// create user01 profile
await prisma.userProfile.create({
data: {
Expand Down

0 comments on commit 9b2cbbe

Please sign in to comment.