The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
small updates: /qr docs, doc_url anchors
Steven Tey6c6a053e9c34
diff --git a/apps/web/lib/api/errors.ts b/apps/web/lib/api/errors.tsindex 07d0ab331c..62e4e802e4 100644--- a/apps/web/lib/api/errors.ts+++ b/apps/web/lib/api/errors.ts@@ -112,7 +112,7 @@ export function fromZodError(error: ZodError): ErrorResponse {label: "",},}),- doc_url: `${docErrorUrl}#unprocessable_entity`,+ doc_url: `${docErrorUrl}#unprocessable-entity`,},};}@@ -147,7 +147,7 @@ export function handleApiError(error: any): ErrorResponse & { status: number } {code: "internal_server_error",message:"An internal server error occurred. Please contact our support if the problem persists.",- doc_url: `${docErrorUrl}#internal_server_error`,+ doc_url: `${docErrorUrl}#internal-server-error`,},status: 500,};@@ -193,7 +193,7 @@ export const errorSchemaFactory = (type: "string",description:"A link to our documentation with more details about this error code",- example: `${docErrorUrl}#${code}`,+ example: `${docErrorUrl}#${code.replace("_", "-")}`,},},required: ["code", "message"],diff --git a/apps/web/lib/openapi/qr/get-qr.ts b/apps/web/lib/openapi/qr/get-qr.tsindex 0c8d2d5d83..efd09c1e33 100644--- a/apps/web/lib/openapi/qr/get-qr.ts+++ b/apps/web/lib/openapi/qr/get-qr.ts@@ -23,5 +23,4 @@ export const getQRCode: ZodOpenApiOperationObject = {...openApiErrorResponses,},tags: ["QR Codes"],- security: [{ token: [] }],};diff --git a/apps/web/lib/zod/schemas/qr.ts b/apps/web/lib/zod/schemas/qr.tsindex a722177f78..0209a21924 100644--- a/apps/web/lib/zod/schemas/qr.ts+++ b/apps/web/lib/zod/schemas/qr.ts@@ -6,16 +6,10 @@ import {} from "@/lib/qr/constants";import z from "@/lib/zod";import { booleanQuerySchema } from "./misc";+import { parseUrlSchema } from "./utils";export const getQRCodeQuerySchema = z.object({- url: z- .string()- .url()- .optional()- .default("https://dub.co")- .describe(- "The URL to generate a QR code for. Defaults to `https://dub.co` if not provided.",- ),+ url: parseUrlSchema.describe("The URL to generate a QR code for."),size: z.coerce.number().optional()diff --git a/apps/web/ui/modals/add-edit-domain-modal/index.tsx b/apps/web/ui/modals/add-edit-domain-modal/index.tsxindex 5dc0813a88..a9eb449f1e 100644--- a/apps/web/ui/modals/add-edit-domain-modal/index.tsx+++ b/apps/web/ui/modals/add-edit-domain-modal/index.tsx@@ -222,7 +222,6 @@ function AddEditDomainModal({) : (<div className="relative mt-2 rounded-md shadow-sm"><input- type="url"name="target"id="target"className="block w-full rounded-md border-gray-300 text-gray-900 placeholder-gray-400 focus:border-gray-500 focus:outline-none focus:ring-gray-500 sm:text-sm"