Skip to content
This repository was archived by the owner on Dec 12, 2020. It is now read-only.

Commit e54dd49

Browse files
authored
fix(api): rename gold check API field to hasGold (#109)
1 parent aaddffb commit e54dd49

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/main/xerus/monstercat/api/APIConnection.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ class APIConnection(vararg path: String): HTTPQuery<APIConnection>() {
217217
val validity = when {
218218
session == null -> ConnectValidity.NOCONNECTION
219219
session.user == null -> ConnectValidity.NOUSER
220-
session.user!!.goldService -> {
220+
session.user!!.hasGold -> {
221221
Cache.refresh(true)
222222
ConnectValidity.GOLD
223223
}

src/main/xerus/monstercat/api/response/Session.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import com.google.api.client.util.Key
66
data class Session(@Key var user: User? = null, @Key var settings: Settings? = null)
77

88
/** User infos, included in a session if the connect.sid is valid */
9-
data class User(@Key var goldService: Boolean = false)
9+
data class User(@Key var hasGold: Boolean = false)
1010

1111
/** User settings, included in a session if the connect.sid is valid */
1212
data class Settings(@Key var preferredDownloadFormat: String = "")

0 commit comments

Comments
 (0)