[F] Fix username mismatch

pull/99/head^2
Azalea 2025-01-05 04:39:11 -05:00
parent a70e9130f5
commit 6cfd0a91fc
2 changed files with 3 additions and 3 deletions

View File

@ -36,7 +36,7 @@ fun ChusanController.chusanInit() {
val recent = db.netBattleLog.findTop20ByUserOrderByIdDesc(u)
mapOf("userId" to uid, "userNetBattleData" to mapOf(
"recentNBSelectMusicList" to (misc?.recentNbSelect ?: empty),
"recentNBMusicList" to recent.map { it.toDict() },
"recentNBMusicList" to recent.map { it.toDict(u.userName) },
))
}
"GetUserNetBattleRankingInfo" { """{"userId":"${data["userId"]}","length":"0","userNetBattleRankingInfoList":{}}""" }

View File

@ -55,11 +55,11 @@ class Chu3NetBattleLog(
) : Chu3UserEntity() {
// musicId, difficultyId, userName, score, memberName{1-3}, memberScore{1-3}, selectedMemberNum
fun toDict() = mapOf(
fun toDict(username: String) = mapOf(
"musicId" to musicId,
"difficultyId" to difficultyId,
"score" to score,
"userName" to selectUserName,
"userName" to username,
"memberName1" to opponentUserName1,
"memberScore1" to opponentScore1,
"memberName2" to opponentUserName2,