Skip to content

Commit

Permalink
web: Add workaround for '1' leaderboard trophy
Browse files Browse the repository at this point in the history
  • Loading branch information
schneefux committed Dec 13, 2023
1 parent b6339ed commit a0ea32a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions web/api/services/BrawlstarsService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,12 @@ export default class BrawlstarsService {

public async getPlayerRanking(countryCode: string) {
const response = await this.apiRequest<{ items: PlayerRanking[] }>(`rankings/${countryCode}/players`, 'fetch_player_rankings')
response.items.forEach(i => {
if (i.trophies == 1) {
// FIXME 2023-12-13: players above 100k trophies return '1'
i.trophies = 100000
}
})
return response.items
}

Expand Down

0 comments on commit a0ea32a

Please sign in to comment.