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 apps/web/lib/zod/schemas/commissions.ts

Steven Teyc06aeaae620e
diff --git a/apps/web/lib/zod/schemas/commissions.ts b/apps/web/lib/zod/schemas/commissions.ts
index 2e7fe55f46..7b184c2c05 100644
--- a/apps/web/lib/zod/schemas/commissions.ts
+++ b/apps/web/lib/zod/schemas/commissions.ts
@@ -746,7 +746,11 @@ export const createManualCommissionBodySchema = z
return;
}
- if (data.type === "sale" && data.linkId && data.discountCode) {
+ if (
+ data.type === "sale" &&
+ data.linkId != null &&
+ data.discountCode != null
+ ) {
ctx.addIssue({
code: "custom",
message: "Either `linkId` or `discountCode` may be provided, not both.",