mirror of
https://github.com/lukevella/rallly.git
synced 2025-07-26 04:37:34 +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 }) => {
|
export const getSpace = cache(async ({ id }: { id: string }) => {
|
||||||
const { ability } = await requireUserAbility();
|
|
||||||
return await prisma.space.findFirst({
|
return await prisma.space.findFirst({
|
||||||
where: {
|
where: {
|
||||||
AND: [accessibleBy(ability).Space, { id }],
|
id,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue