Skip to content

OpenPanel is an open-source web and product analytics platform, an open-source alternative to Mixpanel with optional self-hosting.

fix: broken billing updates if user does not exists anymore

Carl-Gerhard Lindesvärd74ec2fb9e4c9
diff --git a/apps/api/src/controllers/webhook.controller.ts b/apps/api/src/controllers/webhook.controller.ts
index 38c30bfa1..4f6ace1b1 100644
--- a/apps/api/src/controllers/webhook.controller.ts
+++ b/apps/api/src/controllers/webhook.controller.ts
@@ -266,8 +266,6 @@ async function syncSubscriptionToOrg(
? data.currentPeriodEnd
: data.canceledAt
: data.currentPeriodEnd,
- subscriptionCreatedByUserId:
- metadata.userId ?? organization.subscriptionCreatedByUserId,
subscriptionInterval: data.recurringInterval,
subscriptionPeriodEventsLimit,
subscriptionPeriodEventsCountExceededAt: