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-link.ts

Kiran K634c0a55ef7f
diff --git a/apps/web/lib/api/links/delete-link.ts b/apps/web/lib/api/links/delete-link.ts
index 460645fcaf..96abb9029c 100644
--- a/apps/web/lib/api/links/delete-link.ts
+++ b/apps/web/lib/api/links/delete-link.ts
@@ -29,6 +29,7 @@ export async function deleteLink(linkId: string) {
},
});
+ // Delete the discount code and link in a transaction
await prisma.$transaction([
...(link.discountCode
? [