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 the response

Kiran K3062165ee4ed
diff --git a/apps/web/app/api/domains/route.ts b/apps/web/app/api/domains/route.ts
index 9a03a554ac..21a39459a2 100644
--- a/apps/web/app/api/domains/route.ts
+++ b/apps/web/app/api/domains/route.ts
@@ -6,7 +6,7 @@ import {
import { exceededLimitError } from "@/lib/api/errors";
import { withAuth } from "@/lib/auth";
import prisma from "@/lib/prisma";
-import { addDomainBodySchema } from "@/lib/zod/schemas";
+import { DomainSchema, addDomainBodySchema } from "@/lib/zod/schemas";
import { NextResponse } from "next/server";
// GET /api/domains – get all domains for a workspace
@@ -94,5 +94,5 @@ export const POST = withAuth(async ({ req, workspace }) => {
rewrite: type === "rewrite",
});
- return NextResponse.json(response);
+ return NextResponse.json(DomainSchema.parse(response));
});