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.

refactor: validate partner link response with schema before returning

Kiran Kb561895716e0
diff --git a/apps/web/app/api/partner-profile/programs/[programId]/links/route.ts b/apps/web/app/api/partner-profile/programs/[programId]/links/route.ts
index 0df215f9e9..33ab64f6fa 100644
--- a/apps/web/app/api/partner-profile/programs/[programId]/links/route.ts
+++ b/apps/web/app/api/partner-profile/programs/[programId]/links/route.ts
@@ -95,6 +95,8 @@ export const POST = withPartnerProfile(
const partnerLink = await createLink(link);
- return NextResponse.json(partnerLink, { status: 201 });
+ return NextResponse.json(PartnerProfileLinkSchema.parse(partnerLink), {
+ status: 201,
+ });
},
);