chore: add all the code from original repo
This commit is contained in:
20
data/initializeUser.ts
Normal file
20
data/initializeUser.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import prisma from '../prisma/prisma';
|
||||
|
||||
export async function initializeUser() {
|
||||
return await prisma.user.upsert({
|
||||
where: {
|
||||
email: process.env.EMAIL!
|
||||
},
|
||||
update: {},
|
||||
create: {
|
||||
email: process.env.EMAIL!,
|
||||
password: process.env.EMAIL!,
|
||||
name: process.env.EMAIL!,
|
||||
Profiles: {
|
||||
create: {
|
||||
name: 'Default profile'
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user