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.

Add idempotency keys to submitted lead comment emails

Rafi9d9a8bb7a532
diff --git a/apps/web/app/(ee)/api/cron/submitted-leads/comments/notify-partner/route.ts b/apps/web/app/(ee)/api/cron/submitted-leads/comments/notify-partner/route.ts
index 642d830b12..8630082681 100644
--- a/apps/web/app/(ee)/api/cron/submitted-leads/comments/notify-partner/route.ts
+++ b/apps/web/app/(ee)/api/cron/submitted-leads/comments/notify-partner/route.ts
@@ -125,6 +125,9 @@ export async function POST(req: Request) {
email,
}),
})),
+ {
+ idempotencyKey: `submitted-lead-comments-partner/${lastCommentId}`,
+ },
);
if (error)
diff --git a/apps/web/app/(ee)/api/cron/submitted-leads/comments/notify-program/route.ts b/apps/web/app/(ee)/api/cron/submitted-leads/comments/notify-program/route.ts
index 93af279082..63bb2a45bb 100644
--- a/apps/web/app/(ee)/api/cron/submitted-leads/comments/notify-program/route.ts
+++ b/apps/web/app/(ee)/api/cron/submitted-leads/comments/notify-program/route.ts
@@ -130,6 +130,9 @@ export async function POST(req: Request) {
email,
}),
})),
+ {
+ idempotencyKey: `submitted-lead-comments-program/${lastCommentId}`,
+ },
);
if (error)