From 986262e1d44af53187de0e2a27c7d9fc2154da21 Mon Sep 17 00:00:00 2001 From: Nicolas Date: Mon, 30 Sep 2024 15:23:43 -0300 Subject: [PATCH] Update search.ts --- apps/api/src/controllers/v0/search.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/api/src/controllers/v0/search.ts b/apps/api/src/controllers/v0/search.ts index 24f58633..3635a4c4 100644 --- a/apps/api/src/controllers/v0/search.ts +++ b/apps/api/src/controllers/v0/search.ts @@ -37,7 +37,12 @@ export async function searchHelper( const tbs = searchOptions.tbs ?? null; const filter = searchOptions.filter ?? null; - const num_results = searchOptions.limit ?? 7; + let num_results = Math.min(searchOptions.limit ?? 7, 10); + + if (team_id === "d97c4ceb-290b-4957-8432-2b2a02727d95") { + num_results = 1; + } + const num_results_buffer = Math.floor(num_results * 1.5); let res = await search({