Skip to content

Commit 7abf316

Browse files
committed
🐛 fix: MyPageInfo 생성 시 할당되는 값 순서 변경
1 parent 15bb20c commit 7abf316

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
@@ -166,8 +166,8 @@ public MyPageInfo getStatByUserId(long userId) {
166166
return new MyPageInfo(
167167
(String) statMap.get("nickname"),
168168
rank + 1,
169+
score.longValue(),
169170
(long) statMap.get("totalGames"),
170-
(long) statMap.get("winningGames"),
171-
score.longValue());
171+
(long) statMap.get("winningGames"));
172172
}
173173
}

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)