From 0965517bd4bdf59d01f2efa38c75ee08ee01caed Mon Sep 17 00:00:00 2001 From: Kiran K Date: Wed, 17 Apr 2024 16:18:31 +0530 Subject: [PATCH 1/2] add `ws_` prefix to the id returned by create workspace api --- apps/web/app/api/workspaces/route.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/web/app/api/workspaces/route.ts b/apps/web/app/api/workspaces/route.ts index a5d5760948..2cdbcc58dd 100644 --- a/apps/web/app/api/workspaces/route.ts +++ b/apps/web/app/api/workspaces/route.ts @@ -157,6 +157,7 @@ export const POST = withSession(async ({ req, session }) => { const response = { ...projectResponse, + id: `ws_${projectResponse.id}`, domains: projectResponse.domains.map(({ slug, primary }) => ({ slug, primary, From 4ce90a057c1066f76d5d7e578a00170b45a17d38 Mon Sep 17 00:00:00 2001 From: Kiran K Date: Wed, 17 Apr 2024 16:27:52 +0530 Subject: [PATCH 2/2] update `updateLinkBodySchema` to make it optional --- apps/web/lib/zod/schemas/links.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/web/lib/zod/schemas/links.ts b/apps/web/lib/zod/schemas/links.ts index f5cd64b729..358637ceb8 100644 --- a/apps/web/lib/zod/schemas/links.ts +++ b/apps/web/lib/zod/schemas/links.ts @@ -217,7 +217,7 @@ export const createLinkBodySchema = z.object({ ), }); -export const updateLinkBodySchema = createLinkBodySchema.partial(); +export const updateLinkBodySchema = createLinkBodySchema.partial().optional(); export const bulkCreateLinksBodySchema = z .array(createLinkBodySchema)