From 1e4ac338ed57ed851f6e29d39304df25a6dfd279 Mon Sep 17 00:00:00 2001 From: Alek Perron Date: Wed, 22 May 2024 14:44:14 -0400 Subject: [PATCH] fix: SKFP-1077 exclude member stats for Include Project --- src/endpoints/statistics/index.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/endpoints/statistics/index.ts b/src/endpoints/statistics/index.ts index e11c853..a7b0581 100644 --- a/src/endpoints/statistics/index.ts +++ b/src/endpoints/statistics/index.ts @@ -298,6 +298,8 @@ export const fetchTopDiagnosis = async (client: Client): Promise => }; export const fetchMemberStats = async (client: Client): Promise => { + if (project === PROJECT_INCLUDE) return; + const { body: members } = await client.count({ index: esMembersIndex, }); @@ -327,6 +329,7 @@ export const getStatistics = async (): Promise => { ]); const diagnosis = await fetchTopDiagnosis(client); + const members = await fetchMemberStats(client); return { files: results[0],