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 links.ts

Steven Tey81886a39f798
diff --git a/apps/web/lib/zod/schemas/links.ts b/apps/web/lib/zod/schemas/links.ts
index bdab11d396..95275bbf39 100644
--- a/apps/web/lib/zod/schemas/links.ts
+++ b/apps/web/lib/zod/schemas/links.ts
@@ -198,8 +198,9 @@ export const createLinkBodySchema = z.object({
)
.openapi({ deprecated: true }),
tagIds: z
- .array(z.string())
- .nullish()
+ .union([z.string(), z.array(z.string())])
+ .transform((v) => (Array.isArray(v) ? v : v.split(",")))
+ .optional()
.describe("The unique IDs of the tags assigned to the short link."),
comments: z.string().nullish().describe("The comments for the short link."),
});