Skip to content

Commit

Permalink
Merge pull request #1421 from academic-relations/1401-fix-club-list-a…
Browse files Browse the repository at this point in the history
…pi-to-hide-test-clubs

feat: filter out specific club IDs from club list
  • Loading branch information
pbc1017 authored Feb 4, 2025
2 parents b74bd9a + 7aab3b3 commit 9f95207
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/api/src/feature/club/service/club.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,17 @@ export class ClubService {
private clubPublicService: ClubPublicService,
) {}

private readonly EXCLUDED_CLUB_IDS: number[] = [112, 113, 121];

async getClubs(): Promise<ApiClb001ResponseOK> {
const result = await this.clubRepository.getClubs();

result.divisions.forEach(division => {
// eslint-disable-next-line no-param-reassign
division.clubs = division.clubs.filter(
club => !this.EXCLUDED_CLUB_IDS.includes(club.id),
);
});
return result;
}

Expand Down

0 comments on commit 9f95207

Please sign in to comment.