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 groups.ts

Kiran Ke3c48fe466de
diff --git a/apps/web/lib/zod/schemas/groups.ts b/apps/web/lib/zod/schemas/groups.ts
index 6552ecfac1..9f66db7213 100644
--- a/apps/web/lib/zod/schemas/groups.ts
+++ b/apps/web/lib/zod/schemas/groups.ts
@@ -61,7 +61,15 @@ export const createGroupSchema = z.object({
color: z.enum(RESOURCE_COLORS).nullable(),
});
-export const updateGroupSchema = createGroupSchema.partial();
+export const defaultPartnerLinkSchema = z.object({
+ domain: z.string(),
+ url: z.string(),
+ linkStructure: z.nativeEnum(PartnerLinkStructure),
+});
+
+export const updateGroupSchema = createGroupSchema.partial().extend({
+ defaultPartnerLink: defaultPartnerLinkSchema.optional(),
+});
export const changeGroupSchema = z.object({
partnerIds: z.array(z.string()).min(1),
@@ -97,9 +105,3 @@ export const getGroupsQuerySchema = z
export const getGroupsCountQuerySchema = z.object({
search: z.string().optional(),
});
-
-export const defaultPartnerLinkSchema = z.object({
- domain: z.string(),
- url: z.string(),
- linkStructure: z.nativeEnum(PartnerLinkStructure),
-});