Skip to content

Commit

Permalink
fix: SKFP-1077 exclude member stats for Include Project
Browse files Browse the repository at this point in the history
  • Loading branch information
aperron-ferlab committed May 22, 2024
1 parent 31d1c05 commit 1e4ac33
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/endpoints/statistics/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,8 @@ export const fetchTopDiagnosis = async (client: Client): Promise<Diagnosis[]> =>
};

export const fetchMemberStats = async (client: Client): Promise<MembersCount> => {
if (project === PROJECT_INCLUDE) return;

const { body: members } = await client.count({
index: esMembersIndex,
});
Expand Down Expand Up @@ -327,6 +329,7 @@ export const getStatistics = async (): Promise<Statistics> => {
]);

const diagnosis = await fetchTopDiagnosis(client);

const members = await fetchMemberStats(client);
return {
files: results[0],
Expand Down

0 comments on commit 1e4ac33

Please sign in to comment.