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

Commit

Permalink
fix(api): rename gold check API field to hasGold (#109)
Browse files Browse the repository at this point in the history
  • Loading branch information
defvs committed Apr 20, 2020
1 parent aaddffb commit e54dd49
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/xerus/monstercat/api/APIConnection.kt
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ class APIConnection(vararg path: String): HTTPQuery<APIConnection>() {
val validity = when {
session == null -> ConnectValidity.NOCONNECTION
session.user == null -> ConnectValidity.NOUSER
session.user!!.goldService -> {
session.user!!.hasGold -> {
Cache.refresh(true)
ConnectValidity.GOLD
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/xerus/monstercat/api/response/Session.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import com.google.api.client.util.Key
data class Session(@Key var user: User? = null, @Key var settings: Settings? = null)

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

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

0 comments on commit e54dd49

Please sign in to comment.