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.

mark the sale as paid

Kiran K009ff6c4909a
diff --git a/apps/web/app/api/cron/invoices/utils.ts b/apps/web/app/api/cron/invoices/utils.ts
index 2f833a0fb3..3063d1ff76 100644
--- a/apps/web/app/api/cron/invoices/utils.ts
+++ b/apps/web/app/api/cron/invoices/utils.ts
@@ -113,6 +113,15 @@ export const processInvoice = async ({ invoiceId }: { invoiceId: string }) => {
status: "completed",
},
});
+
+ await prisma.sale.updateMany({
+ where: {
+ payoutId: payout.id,
+ },
+ data: {
+ status: "paid",
+ },
+ });
}
} catch (error) {
throw new Error(