chore(root): rename organizationSlug to organizationId (#91)

This commit is contained in:
Carl-Gerhard Lindesvärd
2024-11-20 14:04:55 +01:00
committed by GitHub
parent 0221948aab
commit cd16ac878d
52 changed files with 176 additions and 360 deletions

View File

@@ -88,17 +88,6 @@ const enforceAccess = t.middleware(async ({ ctx, next, rawInput }) => {
}
}
if (has('organizationSlug', rawInput)) {
const access = await getOrganizationAccessCached({
userId: ctx.session.userId!,
organizationId: rawInput.organizationSlug as string,
});
if (!access) {
throw TRPCAccessError('You do not have access to this organization');
}
}
return next();
});