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.

fix

Steven Tey2ec4db1aa6e1
diff --git a/apps/web/app/api/links/route.ts b/apps/web/app/api/links/route.ts
index 79bf7cd3af..06153c2749 100644
--- a/apps/web/app/api/links/route.ts
+++ b/apps/web/app/api/links/route.ts
@@ -1,7 +1,7 @@
+import { DubApiError, ErrorCodes } from "@/lib/api/errors";
import { addLink, getLinksForProject, processLink } from "@/lib/api/links";
import { withAuth } from "@/lib/auth";
import { qstash } from "@/lib/cron";
-import { DubApiError, ErrorCodes } from "@/lib/api/errors";
import { LinkWithTagIdsProps } from "@/lib/types";
import { ratelimit } from "@/lib/upstash";
import {
diff --git a/apps/web/lib/zod/schemas/links.ts b/apps/web/lib/zod/schemas/links.ts
index e671f25a35..9e489519bd 100644
--- a/apps/web/lib/zod/schemas/links.ts
+++ b/apps/web/lib/zod/schemas/links.ts
@@ -1,5 +1,6 @@
import z from "@/lib/zod";
import { booleanQuerySchema } from ".";
+import { tagSchema } from "./tags";
const LinksQuerySchema = {
projectSlug: z
@@ -178,6 +179,9 @@ export const createLinkBodySchema = z.object({
.optional()
.default(false)
.describe("Whether the short link's stats are publicly accessible."),
+ /**
+ * @deprecated use tagIds instead
+ */
tagId: z
.string()
.nullish()
@@ -276,10 +280,10 @@ export const LinkSchema = z
.boolean()
.default(false)
.describe("Whether the short link's stats are publicly accessible."),
- tagId: z
- .string()
+ tags: tagSchema
+ .array()
.nullable()
- .describe("The unique id of the tag assigned to the short link."),
+ .describe("The tags assigned to the short link."),
comments: z
.string()
.nullable()