Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

fix(api): brand Signed BAA organization id in webhook

Richie McIlroyedb6bc843b58
diff --git a/apps/web/app/api/webhooks/stripe/route.ts b/apps/web/app/api/webhooks/stripe/route.ts
index 1a7ddf389..888ca886d 100644
--- a/apps/web/app/api/webhooks/stripe/route.ts
+++ b/apps/web/app/api/webhooks/stripe/route.ts
@@ -107,7 +107,9 @@ async function syncSignedBaaStatus(
const status = BAA_ENTITLED_STATUSES.has(subscription.status)
? "active"
: "canceled";
- const organizationId = subscription.metadata?.organizationId;
+ const organizationId = subscription.metadata?.organizationId
+ ? Organisation.OrganisationId.make(subscription.metadata.organizationId)
+ : undefined;
await db()
.update(signedBaas)
.set({