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.

More tweaks

Tim Wilson246ec97c1612
diff --git a/apps/web/lib/zod/schemas/partners.ts b/apps/web/lib/zod/schemas/partners.ts
index 31acd6639e..1975535895 100644
--- a/apps/web/lib/zod/schemas/partners.ts
+++ b/apps/web/lib/zod/schemas/partners.ts
@@ -250,12 +250,21 @@ export const PartnerProfileSchema = z.object({
industryInterests: z
.array(z.nativeEnum(IndustryInterest))
.max(MAX_PARTNER_INDUSTRY_INTERESTS)
+ .refine((arr) => new Set(arr).size === arr.length, {
+ message: "Duplicate industry interests are not allowed.",
+ })
.describe("The partner's industry interests."),
preferredEarningStructures: z
.array(z.nativeEnum(PreferredEarningStructure))
+ .refine((arr) => new Set(arr).size === arr.length, {
+ message: "Duplicate preferred earning structures are not allowed.",
+ })
.describe("The partner's preferred earning structures."),
salesChannels: z
.array(z.nativeEnum(SalesChannel))
+ .refine((arr) => new Set(arr).size === arr.length, {
+ message: "Duplicate sales channels are not allowed.",
+ })
.describe("The partner's sales channels."),
});
diff --git a/packages/prisma/schema/partner.prisma b/packages/prisma/schema/partner.prisma
index 7d0c73c12f..7129a38f58 100644
--- a/packages/prisma/schema/partner.prisma
+++ b/packages/prisma/schema/partner.prisma
@@ -118,7 +118,7 @@ model PartnerNotificationPreferences {
enum IndustryInterest {
SaaS
DevTool
- AI
+ AI
Creative_And_Design
Productivity_Software
Marketing