The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
Update delete-discount.ts
Kiran K0a93a55f38ca
diff --git a/apps/web/lib/api/partners/delete-discount.ts b/apps/web/lib/api/partners/delete-discount.tsindex b1dfc22ce5..d99c620f25 100644--- a/apps/web/lib/api/partners/delete-discount.ts+++ b/apps/web/lib/api/partners/delete-discount.ts@@ -99,22 +99,21 @@ export async function deleteDiscount({},}),- user- ? recordAuditLog({- workspaceId: workspace.id,- programId,- action: "discount.deleted",- description: `Discount ${discount.id} deleted`,- actor: user,- targets: [- {- type: "discount",- id: discount.id,- metadata: discount,- },- ],- })- : Promise.resolve(),+ user &&+ recordAuditLog({+ workspaceId: workspace.id,+ programId,+ action: "discount.deleted",+ description: `Discount ${discount.id} deleted`,+ actor: user,+ targets: [+ {+ type: "discount",+ id: discount.id,+ metadata: discount,+ },+ ],+ }),discount.couponId &&deleteStripeCoupon({