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.

rename route /confirm → /eligible

Steven Tey42ab1982086e
diff --git a/apps/web/app/(ee)/api/programs/[programId]/payouts/confirm/route.ts b/apps/web/app/(ee)/api/programs/[programId]/payouts/eligible/route.ts
similarity index 90%
rename from apps/web/app/(ee)/api/programs/[programId]/payouts/confirm/route.ts
rename to apps/web/app/(ee)/api/programs/[programId]/payouts/eligible/route.ts
index 848115ce95..27457a814c 100644
--- a/apps/web/app/(ee)/api/programs/[programId]/payouts/confirm/route.ts
+++ b/apps/web/app/(ee)/api/programs/[programId]/payouts/eligible/route.ts
@@ -15,14 +15,14 @@ const confirmPayoutsQuerySchema = z.object({
});
/*
- * GET /api/programs/[programId]/payouts/confirm - get list of payouts to confirm
+ * GET /api/programs/[programId]/payouts/eligible - get list of eligible payouts
*
- * We're splitting this out of /payouts because it's a special case that needs
+ * We're splitting this from /payouts because it's a special case that needs
* to be handled differently:
* - only include eligible payouts
* - no pagination or filtering (we retrieve all pending payouts by default)
* - sort by amount in descending order
- * - option to exclude current month's commissions
+ * - option to set a cutoff period to include commissions up to that date
*/
export const GET = withWorkspace(async ({ workspace, searchParams }) => {
diff --git a/apps/web/ui/partners/payout-invoice-sheet.tsx b/apps/web/ui/partners/payout-invoice-sheet.tsx
index 2431272c76..49b8ef6624 100644
--- a/apps/web/ui/partners/payout-invoice-sheet.tsx
+++ b/apps/web/ui/partners/payout-invoice-sheet.tsx
@@ -82,7 +82,7 @@ function PayoutInvoiceSheetContent() {
error: eligiblePayoutsError,
isLoading: eligiblePayoutsLoading,
} = useSWR<PayoutResponse[]>(
- `/api/programs/${defaultProgramId}/payouts/confirm?${new URLSearchParams({
+ `/api/programs/${defaultProgramId}/payouts/eligible?${new URLSearchParams({
workspaceId,
cutoffPeriod,
} as Record<string, any>).toString()}`,
@@ -296,7 +296,7 @@ function PayoutInvoiceSheetContent() {
tdClassName: (id) => cn(id === "total" && "text-right", "border-l-0"),
className: "[&_tr:last-child>td]:border-b-transparent",
scrollWrapperClassName: "min-h-[40px]",
- resourceName: (p) => `pending payout${p ? "s" : ""}`,
+ resourceName: (p) => `eligible payout${p ? "s" : ""}`,
loading: eligiblePayoutsLoading,
error: eligiblePayoutsError
? "Failed to load payouts for this invoice."