Skip to content

Commit

Permalink
update rankingRepositoryImpl, gameRepositoryImp
Browse files Browse the repository at this point in the history
  • Loading branch information
ClaudioMartinH committed Sep 26, 2024
1 parent 99cdb03 commit 8b26001
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export class GameRepositoryImpl {
totalLost: 1,
},
});
const percentage = (updatedRanking.totalLost / updatedRanking.totalGames) * 100;
const percentage = (updatedRanking.totalWins / updatedRanking.totalGames) * 100;
await prisma.ranking.upsert({
where: { playerId: data.playerId },
update: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export class RankingRepositoryImpl {
async getRanking(): Promise<Ranking[]> {
return await prisma.ranking.findMany({
orderBy: {
winPercentage: 'asc'
winPercentage: 'desc'
},
});
};
Expand Down

0 comments on commit 8b26001

Please sign in to comment.