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 K93f4da40354a
diff --git a/apps/web/app/(ee)/api/partner-profile/programs/[programId]/earnings/count/route.ts b/apps/web/app/(ee)/api/partner-profile/programs/[programId]/earnings/count/route.ts
index 2011dbe5fc..3f9983ed1c 100644
--- a/apps/web/app/(ee)/api/partner-profile/programs/[programId]/earnings/count/route.ts
+++ b/apps/web/app/(ee)/api/partner-profile/programs/[programId]/earnings/count/route.ts
@@ -66,7 +66,9 @@ export const GET = withPartnerProfile(
const links = await prisma.link.findMany({
where: {
id: {
- in: counts.map(({ linkId }) => linkId),
+ in: counts
+ .map(({ linkId }) => linkId)
+ .filter((id): id is string => id !== null),
},
},
});