Skip to content

Commit

Permalink
Sort player's games properly by gameID
Browse files Browse the repository at this point in the history
  • Loading branch information
amineo committed Sep 27, 2020
1 parent 98affdd commit 2f3f61f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/api/src/player/player.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,9 @@ export class PlayerService {
Number(player.totalGamesDmgame) +
Number(player.totalGamesSctfgame) +
Number(player.totalGamesLakrabbitgame),
gameDetails: gameDetails.sort((a, b) => b.id - a.id).filter((g) => g.stats.scoreTG > 0),
gameDetails: gameDetails
.filter((g) => g.stats.scoreTG > 0)
.sort((a, b) => Number(b.stats.gameID) - Number(a.stats.gameID)),
statTotals: playerStatTotals
};

Expand Down

0 comments on commit 2f3f61f

Please sign in to comment.