mirror of
https://github.com/MewoLab/AquaDX.git
synced 2026-02-11 08:17:26 +08:00
[F] Should not display migrated user in ranking
This commit is contained in:
@@ -5,6 +5,7 @@ import icu.samnyan.aqua.net.BotProps
|
|||||||
import icu.samnyan.aqua.net.db.AquaUserServices
|
import icu.samnyan.aqua.net.db.AquaUserServices
|
||||||
import icu.samnyan.aqua.net.utils.SUCCESS
|
import icu.samnyan.aqua.net.utils.SUCCESS
|
||||||
import icu.samnyan.aqua.sega.general.model.Card
|
import icu.samnyan.aqua.sega.general.model.Card
|
||||||
|
import icu.samnyan.aqua.sega.general.model.CardStatus
|
||||||
import jakarta.annotation.PostConstruct
|
import jakarta.annotation.PostConstruct
|
||||||
import org.slf4j.LoggerFactory
|
import org.slf4j.LoggerFactory
|
||||||
import org.springframework.beans.factory.annotation.Autowired
|
import org.springframework.beans.factory.annotation.Autowired
|
||||||
@@ -55,7 +56,7 @@ abstract class GameApiController<T : IUserData>(val name: String, userDataClass:
|
|||||||
|
|
||||||
val reqUser = token?.let { us.jwt.auth(it) }?.let { u ->
|
val reqUser = token?.let { us.jwt.auth(it) }?.let { u ->
|
||||||
// Optimization: If the user is not banned, we don't need to process user information
|
// Optimization: If the user is not banned, we don't need to process user information
|
||||||
if (!u.ghostCard.rankingBanned && !u.cards.any { it.rankingBanned }) null
|
if (!u.ghostCard.rankingBanned && !u.cards.any { it.rankingBanned } && u.ghostCard.status == CardStatus.NORMAL) null
|
||||||
else u
|
else u
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user