The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
Fix promotion code resolution return shape
Kiran Kd20a345901da
diff --git a/apps/web/app/(ee)/api/stripe/integration/webhook/invoice-paid.ts b/apps/web/app/(ee)/api/stripe/integration/webhook/invoice-paid.tsindex 8c1453fac0..041ded72d3 100644--- a/apps/web/app/(ee)/api/stripe/integration/webhook/invoice-paid.ts+++ b/apps/web/app/(ee)/api/stripe/integration/webhook/invoice-paid.ts@@ -445,19 +445,19 @@ async function resolvePromotionCodeIdFromInvoice({if (!expandedInvoice) {return {promotionCodeId: null,- error: "Invoice not found", // should never happen, but just in case+ resolvePromotionCodeError: "Invoice not found", // should never happen, but just in case};}if (!expandedInvoice.discounts || expandedInvoice.discounts.length === 0) {return {promotionCodeId: null,- error: "No discounts found on invoice",+ resolvePromotionCodeError: "No discounts found on invoice",};}return {promotionCodeId: expandedInvoice.discounts[0].promotion_code.id,- error: null,+ resolvePromotionCodeError: null,};}