user creation and invites
This commit is contained in:
@@ -5,5 +5,18 @@ export const queries = {
|
||||
const allEvents = await prisma.event.findMany()
|
||||
console.log(allEvents)
|
||||
return allEvents;
|
||||
},
|
||||
|
||||
async singleEvent(id: string) {
|
||||
const event = await prisma.event.findUnique({
|
||||
where: { id },
|
||||
include: {
|
||||
creator: {
|
||||
select: { id: true, email: true, name: true, role: true },
|
||||
},
|
||||
guests: true
|
||||
}
|
||||
})
|
||||
return event
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user