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.

Expire Shopify checkout session (instead of delete)

Steven Tey7f8ac9284fe3
diff --git a/apps/web/app/api/cron/shopify/order-paid/route.ts b/apps/web/app/api/cron/shopify/order-paid/route.ts
index 9786ff4c4c..49e382f899 100644
--- a/apps/web/app/api/cron/shopify/order-paid/route.ts
+++ b/apps/web/app/api/cron/shopify/order-paid/route.ts
@@ -38,7 +38,8 @@ export async function POST(req: Request) {
// clickId is empty, order is not from a Dub link
if (clickId === "") {
- await redis.del(`shopify:checkout:${checkoutToken}`);
+ // set key to expire in 24 hours
+ await redis.expire(`shopify:checkout:${checkoutToken}`, 60 * 60 * 24);
return new Response(
`[Shopify] Order is not from a Dub link. Skipping...`,