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.

missed a spot

Steven Teycffa85fdedc3
diff --git a/apps/web/app/api/programs/[programId]/payouts/route.ts b/apps/web/app/api/programs/[programId]/payouts/route.ts
index e083086d80..5a61e8b6f2 100644
--- a/apps/web/app/api/programs/[programId]/payouts/route.ts
+++ b/apps/web/app/api/programs/[programId]/payouts/route.ts
@@ -60,7 +60,7 @@ export const GET = withWorkspace(
partner: true,
_count: {
select: {
- sales: true,
+ commissions: true,
},
},
},
diff --git a/apps/web/lib/zod/schemas/payouts.ts b/apps/web/lib/zod/schemas/payouts.ts
index 83cdda1b2a..998a975515 100644
--- a/apps/web/lib/zod/schemas/payouts.ts
+++ b/apps/web/lib/zod/schemas/payouts.ts
@@ -74,7 +74,7 @@ export const PayoutSchema = z.object({
export const PayoutResponseSchema = PayoutSchema.merge(
z.object({
partner: PartnerSchema,
- _count: z.object({ sales: z.number() }),
+ _count: z.object({ commissions: z.number() }),
}),
);
diff --git a/apps/web/scripts/backfill-payout-quantity.ts b/apps/web/scripts/backfill-payout-quantity.ts
index e10408087a..ecfa642a3f 100644
--- a/apps/web/scripts/backfill-payout-quantity.ts
+++ b/apps/web/scripts/backfill-payout-quantity.ts
@@ -11,7 +11,7 @@ async function main() {
id: true,
_count: {
select: {
- sales: true,
+ commissions: true,
},
},
},
@@ -21,7 +21,7 @@ async function main() {
for (const payout of payouts) {
await prisma.payout.update({
where: { id: payout.id },
- data: { quantity: payout._count.sales },
+ data: { quantity: payout._count.commissions },
});
}
}