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.

move archived to addDomainBodySchema

Steven Teyff9e60b080cd
diff --git a/apps/web/lib/zod/schemas/domains.ts b/apps/web/lib/zod/schemas/domains.ts
index c81c2cb170..185a7e66d9 100644
--- a/apps/web/lib/zod/schemas/domains.ts
+++ b/apps/web/lib/zod/schemas/domains.ts
@@ -66,6 +66,13 @@ export const addDomainBodySchema = z.object({
.describe(
"Redirect users to a specific URL when any link under this domain has expired.",
),
+ archived: z
+ .boolean()
+ .optional()
+ .default(false)
+ .describe(
+ "Whether to archive this domain. `false` will unarchive a previously archived domain.",
+ ),
placeholder: parseUrlSchema
.nullish()
.default("https://dub.co/help/article/what-is-dub")
@@ -74,19 +81,7 @@ export const addDomainBodySchema = z.object({
),
});
-export const updateDomainBodySchema = addDomainBodySchema
- .merge(
- z.object({
- archived: z
- .boolean()
- .optional()
- .default(false)
- .describe(
- "Whether to archive this repository. `false` will unarchive a previously archived domain.",
- ),
- }),
- )
- .partial();
+export const updateDomainBodySchema = addDomainBodySchema.partial();
export const transferDomainBodySchema = z.object({
newWorkspaceId: z