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 update-discount.ts

Kiran Kdb21f37d5db3
diff --git a/apps/web/lib/actions/partners/update-discount.ts b/apps/web/lib/actions/partners/update-discount.ts
index f8eed0ef88..4022127422 100644
--- a/apps/web/lib/actions/partners/update-discount.ts
+++ b/apps/web/lib/actions/partners/update-discount.ts
@@ -39,12 +39,12 @@ export const updateDiscountAction = authActionClient
},
});
- const couponTestIdChanged =
+ const shouldExpireCache =
discount.couponTestId !== updatedDiscount.couponTestId;
waitUntil(
Promise.allSettled([
- couponTestIdChanged &&
+ shouldExpireCache &&
partnerGroup &&
qstash.publishJSON({
url: `${APP_DOMAIN_WITH_NGROK}/api/cron/links/invalidate-for-discounts`,