Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

Check the default program before the Stripe invoice calls.

Rafia4b92af32b20
diff --git a/apps/web/lib/api/customers/get-customer-stripe-invoices.ts b/apps/web/lib/api/customers/get-customer-stripe-invoices.ts
index f6d75385d7..12d28676ab 100644
--- a/apps/web/lib/api/customers/get-customer-stripe-invoices.ts
+++ b/apps/web/lib/api/customers/get-customer-stripe-invoices.ts
@@ -61,6 +61,8 @@ export async function getCustomerStripeInvoices({
});
}
+ const programId = getDefaultProgramIdOrThrow(workspace);
+
const stripe = stripeAppClient({
mode: stripeIntegrationSettings.stripeMode,
});
@@ -114,8 +116,6 @@ export async function getCustomerStripeInvoices({
console.warn(error);
}
- const programId = getDefaultProgramIdOrThrow(workspace);
-
const commissions = await prisma.commission.findMany({
where: {
invoiceId: {