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

Kiran Kf91d3e418019
diff --git a/apps/web/app/(ee)/api/groups/route.ts b/apps/web/app/(ee)/api/groups/route.ts
index 6ee1be7ec3..f035723fff 100644
--- a/apps/web/app/(ee)/api/groups/route.ts
+++ b/apps/web/app/(ee)/api/groups/route.ts
@@ -76,6 +76,9 @@ export const POST = withWorkspace(
},
select: {
defaultLinks: true,
+ additionalLinks: true,
+ maxPartnerLinks: true,
+ linkStructure: true,
},
}),
]);
@@ -106,7 +109,8 @@ export const POST = withWorkspace(
}
// Copy over the default group’s link settings when creating a new group
- const { defaultLinks } = defaultGroup;
+ const { defaultLinks, additionalLinks, maxPartnerLinks, linkStructure } =
+ defaultGroup;
return await tx.partnerGroup.create({
data: {
@@ -116,6 +120,9 @@ export const POST = withWorkspace(
slug,
color,
...(defaultLinks && { defaultLinks }),
+ ...(additionalLinks && { additionalLinks }),
+ ...(maxPartnerLinks && { maxPartnerLinks }),
+ ...(linkStructure && { linkStructure }),
},
include: {
clickReward: true,