Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

fix(web): use proper platform enum in stripe webhook

Richie McIlroy827313862440
diff --git a/apps/web/app/api/webhooks/stripe/route.ts b/apps/web/app/api/webhooks/stripe/route.ts
index adb2a8cc2..f5d84e3dd 100644
--- a/apps/web/app/api/webhooks/stripe/route.ts
+++ b/apps/web/app/api/webhooks/stripe/route.ts
@@ -334,7 +334,12 @@ export const POST = async (req: Request) => {
price_id: subscription.items.data[0]?.price.id,
quantity: inviteQuota,
is_onboarding: session.metadata?.isOnBoarding === "true",
- platform: session.metadata?.platform === "web",
+ platform:
+ session.metadata?.platform === "desktop"
+ ? "desktop"
+ : session.metadata?.platform === "web"
+ ? "web"
+ : "unknown",
is_first_purchase: isFirstPurchase,
is_guest_checkout: isGuestCheckout,
},