Skip to content

Commit 739ebc9

Browse files
authored
🐛 fix: MyPageInfo 생성 시 할당되는 값 순서 변경 (#174)
1 parent 70fc1f8 commit 739ebc9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

backend/src/main/java/io/f1/backend/domain/stat/dao/StatRedisRepository.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,8 @@ public MyPageInfo getStatByUserId(long userId) {
167167
return new MyPageInfo(
168168
(String) statMap.get("nickname"),
169169
rank + 1,
170+
score.longValue(),
170171
parseLong((String) statMap.get("totalGames")),
171-
parseLong((String) statMap.get("winningGames")),
172-
score.longValue());
172+
parseLong((String) statMap.get("winningGames")));
173173
}
174174
}

backend/src/main/java/io/f1/backend/domain/stat/dao/StatRepositoryAdapter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public MyPageInfo getMyPageByUserId(long userId) {
109109
long rank = jpaRepository.countByScoreGreaterThan(stat.score()) + 1;
110110

111111
return new MyPageInfo(
112-
stat.nickname(), rank, stat.totalGames(), stat.winningGames(), stat.score());
112+
stat.nickname(), rank, stat.score(), stat.totalGames(), stat.winningGames());
113113
}
114114

115115
private StatWithUserSummary findStatByUserId(long userId) {

0 commit comments

Comments
 (0)