The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
fix: relax link url validation in add/update program resource actions for legacy data
Kiran K274e3ee935f4
diff --git a/apps/web/lib/actions/partners/program-resources/add-program-resource.ts b/apps/web/lib/actions/partners/program-resources/add-program-resource.tsindex 55e34cca50..1684ad7d14 100644--- a/apps/web/lib/actions/partners/program-resources/add-program-resource.ts+++ b/apps/web/lib/actions/partners/program-resources/add-program-resource.ts@@ -43,7 +43,7 @@ const colorResourceSchema = baseResourceSchema.extend({// Schema for link resourcesconst linkResourceSchema = baseResourceSchema.extend({resourceType: z.literal("link"),- url: z.httpUrl(),+ url: z.url(),});// Combined schema that can handle any resource typediff --git a/apps/web/lib/actions/partners/program-resources/update-program-resource.ts b/apps/web/lib/actions/partners/program-resources/update-program-resource.tsindex 15585708cf..66c9a8b25c 100644--- a/apps/web/lib/actions/partners/program-resources/update-program-resource.ts+++ b/apps/web/lib/actions/partners/program-resources/update-program-resource.ts@@ -48,7 +48,7 @@ const updateColorSchema = baseUpdateSchema.extend({const updateLinkSchema = baseUpdateSchema.extend({resourceType: z.literal("link"),name: z.string().min(1).optional(),- url: z.httpUrl().optional(),+ url: z.url().optional(),});// Combined schema that can handle any resource type