🐛 Fix getSpace

This commit is contained in:
Luke Vella 2025-07-13 15:35:53 +01:00
parent 502e9efe85
commit 22b47d5bcb
No known key found for this signature in database
GPG key ID: 469CAD687F0D784C

View file

@ -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,
},
});
});