Skip to content

Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.

🚧 Reset showBranding on subscription downgrade/cancellation (#2309)

Luke Vella534d119178b2
diff --git a/apps/web/src/app/api/stripe/webhook/handlers/customer-subscription/deleted.ts b/apps/web/src/app/api/stripe/webhook/handlers/customer-subscription/deleted.ts
index 8829a3bfa..2b720725a 100644
--- a/apps/web/src/app/api/stripe/webhook/handlers/customer-subscription/deleted.ts
+++ b/apps/web/src/app/api/stripe/webhook/handlers/customer-subscription/deleted.ts
@@ -44,6 +44,7 @@ export async function onCustomerSubscriptionDeleted(event: Stripe.Event) {
},
data: {
tier: "hobby",
+ showBranding: false,
},
});
});
diff --git a/apps/web/src/app/api/stripe/webhook/handlers/customer-subscription/updated.ts b/apps/web/src/app/api/stripe/webhook/handlers/customer-subscription/updated.ts
index d009105c0..13dbda01e 100644
--- a/apps/web/src/app/api/stripe/webhook/handlers/customer-subscription/updated.ts
+++ b/apps/web/src/app/api/stripe/webhook/handlers/customer-subscription/updated.ts
@@ -84,6 +84,7 @@ export async function onCustomerSubscriptionUpdated(event: Stripe.Event) {
},
data: {
tier,
+ ...(tier === "hobby" ? { showBranding: false } : {}),
},
});
});