mirror of
https://github.com/lukevella/rallly.git
synced 2025-07-24 03:37:23 +02:00
🐛 Fix getSpace
This commit is contained in:
parent
502e9efe85
commit
22b47d5bcb
1 changed files with 1 additions and 2 deletions
|
@ -35,10 +35,9 @@ export const getDefaultSpace = cache(async () => {
|
|||
});
|
||||
|
||||
export const getSpace = cache(async ({ id }: { id: string }) => {
|
||||
const { ability } = await requireUserAbility();
|
||||
return await prisma.space.findFirst({
|
||||
where: {
|
||||
AND: [accessibleBy(ability).Space, { id }],
|
||||
id,
|
||||
},
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue