The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
fix union
Steven Tey7779ffbd3729
diff --git a/apps/web/lib/zod/schemas/partners.ts b/apps/web/lib/zod/schemas/partners.tsindex b56cddc402..1978556b67 100644--- a/apps/web/lib/zod/schemas/partners.ts+++ b/apps/web/lib/zod/schemas/partners.ts@@ -529,21 +529,19 @@ export const createPartnerSchema = z.object({// This is a temporary fix to allow arbitrary image URL// TODO: Fix this by using file-type-const partnerImageSchema = z- .union([- base64ImageSchema,- storedR2ImageUrlSchema,- publicHostedImageSchema,- z- .string()- .url()- .trim()- .refine((url) => url.startsWith(GOOGLE_FAVICON_URL), {- message: `Image URL must start with ${GOOGLE_FAVICON_URL}`,- }),- ])- .transform((v) => v || "")- .optional();+const partnerImageSchema = z.union([+ base64ImageSchema,+ storedR2ImageUrlSchema,+ publicHostedImageSchema,+ z+ .string()+ .url()+ .trim()+ .refine((url) => url.startsWith(GOOGLE_FAVICON_URL), {+ message: `Image URL must start with ${GOOGLE_FAVICON_URL}`,+ }),+ z.string().nullish(), // make image optional+]);export const onboardPartnerSchema = createPartnerSchema.omit({