mirror of https://github.com/hykilpikonna/AquaDX
[F] Fix ranking reindex
parent
b7360c426b
commit
27664164fa
|
@ -83,9 +83,9 @@ abstract class GameApiController<T : IUserData>(val name: String, userDataClass:
|
||||||
|
|
||||||
// Read from cache if we just computed it less than duration ago
|
// Read from cache if we just computed it less than duration ago
|
||||||
// Shadow-ban: Do not show banned cards in the ranking except for the user who owns the card
|
// Shadow-ban: Do not show banned cards in the ranking except for the user who owns the card
|
||||||
return rankingCache.r.filter { !it.l || it.r.username == reqUser?.username }.map { it.r }.also {
|
return rankingCache.r.filter { !it.l || it.r.username == reqUser?.username }
|
||||||
logger.info("Ranking computed in ${millis() - time}ms")
|
.mapIndexed { i, it -> it.r.apply { rank = i + 1 } }
|
||||||
}
|
.also { logger.info("Ranking computed in ${millis() - time}ms") }
|
||||||
}
|
}
|
||||||
|
|
||||||
@API("playlog")
|
@API("playlog")
|
||||||
|
|
|
@ -51,7 +51,7 @@ data class GenericGameSummary(
|
||||||
)
|
)
|
||||||
|
|
||||||
data class GenericRankingPlayer(
|
data class GenericRankingPlayer(
|
||||||
val rank: Int,
|
var rank: Int,
|
||||||
val name: String,
|
val name: String,
|
||||||
val username: String?,
|
val username: String?,
|
||||||
val accuracy: Double,
|
val accuracy: Double,
|
||||||
|
|
Loading…
Reference in New Issue