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.

only import affiliates with more than 1 lead

Steven Tey1184e6557886
diff --git a/apps/web/lib/rewardful/import-affiliates.ts b/apps/web/lib/rewardful/import-affiliates.ts
index 1094125eb0..34f51663ae 100644
--- a/apps/web/lib/rewardful/import-affiliates.ts
+++ b/apps/web/lib/rewardful/import-affiliates.ts
@@ -57,12 +57,8 @@ export async function importAffiliates({
const activeAffiliates = affiliates.filter(
(affiliate) =>
- // only active affiliates
- affiliate.state === "active" &&
- // have more than 1 lead or joined in the last 6 months
- (affiliate.leads > 0 ||
- new Date(affiliate.created_at) >
- new Date(Date.now() - 6 * 30 * 24 * 60 * 60 * 1000)),
+ // only active affiliates and have more than 1 lead
+ affiliate.state === "active" && affiliate.leads > 0,
);
if (activeAffiliates.length > 0) {