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 delete-discount-code.ts

Kiran K046e948d9a6d
diff --git a/apps/web/lib/discounts/delete-discount-code.ts b/apps/web/lib/discounts/delete-discount-code.ts
index d001c8d57f..3594084d77 100644
--- a/apps/web/lib/discounts/delete-discount-code.ts
+++ b/apps/web/lib/discounts/delete-discount-code.ts
@@ -91,14 +91,14 @@ export async function enqueueDeleteDiscountCode(
for (const chunkOfCodes of chunks) {
await enqueueBatchJobs(
- chunkOfCodes.map(({ code, programId, discount }) => ({
+ chunkOfCodes.map((discountCode) => ({
url: `${APP_DOMAIN_WITH_NGROK}/api/cron/discount-codes/disable`,
method: "POST",
queueName: "delete-discount-code",
body: {
- code,
- programId,
- provider: discount.provider,
+ code: discountCode.code,
+ programId: discountCode.programId,
+ provider: discountCode.discount.provider,
},
})),
);