The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
only assign rewardId to affiliates if not defaultRewardId
Steven Tey38200462436a
diff --git a/apps/web/lib/rewardful/import-campaign.ts b/apps/web/lib/rewardful/import-campaign.tsindex 46e1822bb6..0efa79dc31 100644--- a/apps/web/lib/rewardful/import-campaign.ts+++ b/apps/web/lib/rewardful/import-campaign.ts@@ -49,7 +49,9 @@ export async function importCampaign({ programId }: { programId: string }) {return await rewardfulImporter.queue({programId,- ...(defaultRewardId && { rewardId: reward.id }),+ // we will only need to assign rewardId to affiliates if it's not+ // the defaultRewardId of the program+ ...(!defaultRewardId && { rewardId: reward.id }),action: "import-affiliates",});}