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 default value

Kiran Ke01e4c4adecd
diff --git a/apps/web/lib/zod/schemas/sales.ts b/apps/web/lib/zod/schemas/sales.ts
index dd2f60e813..cab408a0b6 100644
--- a/apps/web/lib/zod/schemas/sales.ts
+++ b/apps/web/lib/zod/schemas/sales.ts
@@ -21,13 +21,13 @@ export const saleEventSchemaTB = clickEventSchemaTB
event_id: z.string(),
customer_id: z.string(),
payment_processor: z.string(),
- product_id: z.string(),
+ product_id: z.string().default(""),
amount: z.number().int().positive(),
currency: z.string(),
recurring: z.number(),
recurring_interval: z.string(),
recurring_interval_count: z.number().int().positive(),
- refunded: z.number(),
- metadata: z.string(),
+ refunded: z.number().default(0),
+ metadata: z.string().default(""),
}),
);