📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!
TypeScript chartsclickhousedockergdprgoogle-analyticsmetricsmonitoringmysqlnestjsprivacyredisself-hostedselfhostedstatisticstailwindcssweb-analyticswebanalyticswebsite
added sub update hook
Blue Mousee345a7a1279b
diff --git a/src/webhook/webhook.controller.ts b/src/webhook/webhook.controller.tsindex acced04e0..a3aa7c816 100644--- a/src/webhook/webhook.controller.ts+++ b/src/webhook/webhook.controller.ts@@ -35,9 +35,9 @@ export class WebhookController {const { uid, planCode } = dataObject['metadata']switch (event.type) {- case 'checkout.session.completed':- await this.userService.update(uid, { planCode })- break+ // case 'checkout.session.completed':+ // await this.userService.update(uid, { planCode })+ // breakcase 'invoice.paid':if (dataObject['billing_reason'] == 'subscription_create') {// Setting default payment method for subscription@@ -57,6 +57,9 @@ export class WebhookController {case 'customer.subscription.deleted':await this.userService.update(uid, { planCode: PlanCode.free })break+ case 'customer.subscription.updated':+ // await this.userService.update(uid, { planCode: PlanCode.free })+ breakdefault:throw new BadRequestException('Unexpected event type')}