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.

fix partner firstSaleDate

Steven Teybeac3b75f8fe
diff --git a/apps/web/app/(ee)/api/partner-profile/programs/[programId]/customers/[customerId]/route.ts b/apps/web/app/(ee)/api/partner-profile/programs/[programId]/customers/[customerId]/route.ts
index e06eacb24b..c7be4d6c94 100644
--- a/apps/web/app/(ee)/api/partner-profile/programs/[programId]/customers/[customerId]/route.ts
+++ b/apps/web/app/(ee)/api/partner-profile/programs/[programId]/customers/[customerId]/route.ts
@@ -42,7 +42,11 @@ export const GET = withPartnerProfile(async ({ partner, params }) => {
id: customerId,
},
include: {
+ // find the first commission for this customer and partner
commissions: {
+ where: {
+ partnerId: partner.id,
+ },
take: 1,
orderBy: {
createdAt: "asc",