Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.
TypeScript i18nextnext-authnextjspostgresqlprismareact-emailt3-stacktailwindcsstrpcturborepotypescriptzod
🐛 Fix issue that prevents space from being deleted (#2025)
Luke Vella18c14843e7b8
diff --git a/apps/web/src/features/space/actions.ts b/apps/web/src/features/space/actions.tsindex 7d251ba99..ce413ae09 100644--- a/apps/web/src/features/space/actions.ts+++ b/apps/web/src/features/space/actions.ts@@ -124,6 +124,14 @@ export const deleteSpaceAction = spaceActionClientid: true,ownerId: true,tier: true,+ subscriptions: {+ where: {+ active: true,+ },+ select: {+ id: true,+ },+ },},});@@ -137,12 +145,12 @@ export const deleteSpaceAction = spaceActionClientif (ctx.getMemberAbility().cannot("delete", subject("Space", space))) {throw new AppError({code: "FORBIDDEN",- message: "You do not have access to this space",+ message: "You do not have permission to delete this space",});}// Check if space has an active subscription- if (space.tier === "pro") {+ if (space.subscriptions.length > 0) {throw new AppError({code: "FORBIDDEN",message: