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.

limit getProgramSlugs to top 250 sorted by applications

Steven Tey484a13176877
diff --git a/apps/web/lib/fetchers/get-program-slugs.ts b/apps/web/lib/fetchers/get-program-slugs.ts
index 17175fcf58..8edd4539a7 100644
--- a/apps/web/lib/fetchers/get-program-slugs.ts
+++ b/apps/web/lib/fetchers/get-program-slugs.ts
@@ -6,5 +6,11 @@ export const getProgramSlugs = cache(async () =>
select: {
slug: true,
},
+ orderBy: {
+ applications: {
+ _count: "desc",
+ },
+ },
+ take: 250,
}),
);