refactor: simplify user upsert logic in seed script
This commit is contained in:
+1
-2
@@ -4,7 +4,7 @@ import { getPasswordHash } from "@/lib/security"
|
||||
const prisma = new PrismaClient()
|
||||
|
||||
async function main() {
|
||||
const user = await prisma.user.upsert({
|
||||
await prisma.user.upsert({
|
||||
where: {
|
||||
email: "admin@localhost",
|
||||
},
|
||||
@@ -18,7 +18,6 @@ async function main() {
|
||||
isActive: true,
|
||||
},
|
||||
})
|
||||
console.log(user)
|
||||
}
|
||||
|
||||
main()
|
||||
|
||||
Reference in New Issue
Block a user