Initial commit for wedding-planner MVP
This commit is contained in:
14
lib/setup.ts
Normal file
14
lib/setup.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { prisma } from './prisma';
|
||||
|
||||
export async function isFirstSetup() {
|
||||
const user = await prisma.user.findFirst({
|
||||
where: {
|
||||
OR: [
|
||||
{ role: 'COUPLE' },
|
||||
{ role: 'PLANNER'},
|
||||
]
|
||||
}
|
||||
});
|
||||
|
||||
return !user;
|
||||
}
|
||||
Reference in New Issue
Block a user