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.

Update confirm payouts action

Tim Wilson66b28385eebf
diff --git a/apps/web/lib/actions/partners/confirm-payouts.ts b/apps/web/lib/actions/partners/confirm-payouts.ts
index f8f6bc1ce8..35982bd71a 100644
--- a/apps/web/lib/actions/partners/confirm-payouts.ts
+++ b/apps/web/lib/actions/partners/confirm-payouts.ts
@@ -92,6 +92,8 @@ export const confirmPayoutsAction = authActionClient
cutoffPeriod,
selectedPayoutId,
excludedPayoutIds,
+ page: 1,
+ pageSize: Infinity,
}),
getWebhooks({
diff --git a/apps/web/lib/api/payouts/get-eligible-payouts.ts b/apps/web/lib/api/payouts/get-eligible-payouts.ts
index 0c9d4a7781..1669ea5c2a 100644
--- a/apps/web/lib/api/payouts/get-eligible-payouts.ts
+++ b/apps/web/lib/api/payouts/get-eligible-payouts.ts
@@ -96,8 +96,10 @@ export async function getEligiblePayouts({
orderBy: {
amount: "desc",
},
- skip: (page - 1) * pageSize,
- take: pageSize,
+ ...(isFinite(pageSize) && {
+ skip: (page - 1) * pageSize,
+ take: pageSize,
+ }),
});
if (cutoffPeriodValue) {