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 key to sendCancellationFeedback

Steven Tey1e5bc03bb221
diff --git a/apps/web/app/(ee)/api/stripe/webhook/utils/send-cancellation-feedback.ts b/apps/web/app/(ee)/api/stripe/webhook/utils/send-cancellation-feedback.ts
index d4bdaa617e..df7ae4adc9 100644
--- a/apps/web/app/(ee)/api/stripe/webhook/utils/send-cancellation-feedback.ts
+++ b/apps/web/app/(ee)/api/stripe/webhook/utils/send-cancellation-feedback.ts
@@ -33,6 +33,9 @@ export async function sendCancellationFeedback({
replyTo: "[email protected]",
subject: "Feedback for Dub.co?",
text: `Hey ${owner.name ? owner.name.split(" ")[0] : "there"}!\n\nSaw you canceled your Dub subscription${reasonText ? ` and mentioned that ${reasonText}` : ""} – do you mind sharing if there's anything we could've done better on our side?\n\nWe're always looking to improve our product offering so any feedback would be greatly appreciated!\n\nThank you so much in advance!\n\nBest,\nSteven Tey\nFounder, Dub.co`,
+ headers: {
+ "Idempotency-Key": `cancellation-feedback-${owner.email}`,
+ },
}),
),
);