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.

revert

Kiran K509c5ee8272e
diff --git a/apps/web/app/api/cron/payouts/utils.ts b/apps/web/app/api/cron/payouts/utils.ts
index bc91440e16..f72eb2ba03 100644
--- a/apps/web/app/api/cron/payouts/utils.ts
+++ b/apps/web/app/api/cron/payouts/utils.ts
@@ -1,5 +1,6 @@
import { createId } from "@/lib/api/utils";
import { prisma } from "@/lib/prisma";
+import { subDays } from "date-fns";
// Payout are calcuated at the end of the month
export const processMonthlyPartnerPayouts = async () => {
@@ -38,9 +39,9 @@ export const createPartnerPayouts = async ({
partnerId,
payoutId: null,
status: "pending", // We only want to pay out sales that are pending (not refunded / fraud / duplicate)
- // createdAt: {
- // lte: subDays(new Date(), 30), // Referral commissions are held for 30 days before becoming available.
- // },
+ createdAt: {
+ lte: subDays(new Date(), 30), // Referral commissions are held for 30 days before becoming available.
+ },
},
select: {
id: true,