mirror of https://github.com/hykilpikonna/AquaDX
[+] Return card id in ranking
parent
acf117e43b
commit
8acee1251f
|
@ -123,8 +123,8 @@ fun genericRanking(
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: pagination
|
// TODO: pagination
|
||||||
val users = userDataRepo.findAll().sortedByDescending { it.playerRating }
|
val players = userDataRepo.findAll().sortedByDescending { it.playerRating }
|
||||||
return users.filter { it.card != null }.mapIndexed { i, user ->
|
return players.filter { it.card != null }.mapIndexed { i, user ->
|
||||||
val plays = userPlaylogRepo.findByUserCardExtId(user.card!!.extId)
|
val plays = userPlaylogRepo.findByUserCardExtId(user.card!!.extId)
|
||||||
|
|
||||||
GenericRankingPlayer(
|
GenericRankingPlayer(
|
||||||
|
@ -135,7 +135,7 @@ fun genericRanking(
|
||||||
allPerfect = plays.count { it.isAllPerfect },
|
allPerfect = plays.count { it.isAllPerfect },
|
||||||
fullCombo = plays.count { it.isFullCombo },
|
fullCombo = plays.count { it.isFullCombo },
|
||||||
lastSeen = user.lastPlayDate.toString(),
|
lastSeen = user.lastPlayDate.toString(),
|
||||||
username = user.card!!.aquaUser?.username ?: ""
|
username = user.card!!.aquaUser?.username ?: "user${user.card!!.id}"
|
||||||
)
|
)
|
||||||
}.also { rankingCache[cacheKey] = millis() to it } // Update the cache
|
}.also { rankingCache[cacheKey] = millis() to it } // Update the cache
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue