Fixed overriding getter method in getStatistics
This commit is contained in:
parent
051b6384fb
commit
1cbbeb1a1e
@ -77,7 +77,7 @@ class UserService(
|
|||||||
fun insertApiUser(apiUser: OsuApiModels.UserExtended) {
|
fun insertApiUser(apiUser: OsuApiModels.UserExtended) {
|
||||||
this.logger.debug("Saving user ${apiUser.username}")
|
this.logger.debug("Saving user ${apiUser.username}")
|
||||||
|
|
||||||
val userStatistics = apiUser.getStatistics()
|
val userStatistics = apiUser.getStatisticsEither()
|
||||||
|
|
||||||
if(dslContext.fetchExists(USERS, USERS.USER_ID.eq(apiUser.id))) {
|
if(dslContext.fetchExists(USERS, USERS.USER_ID.eq(apiUser.id))) {
|
||||||
|
|
||||||
|
|||||||
@ -49,7 +49,7 @@ class OsuApiModels {
|
|||||||
val country: UserCountry?
|
val country: UserCountry?
|
||||||
) {
|
) {
|
||||||
|
|
||||||
fun getStatistics(): UserStatistics? {
|
fun getStatisticsEither(): UserStatistics? {
|
||||||
return this.statistics ?: this.statistics_rulesets?.osu
|
return this.statistics ?: this.statistics_rulesets?.osu
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user