Skip to content

Commit c730ace

Browse files
committed
allow token refresh for SpotifyAppApi
1 parent cc7b43f commit c730ace

File tree

1 file changed

+1
-1
lines changed
  • src/commonMain/kotlin/com.adamratzman.spotify/http

1 file changed

+1
-1
lines changed

src/commonMain/kotlin/com.adamratzman.spotify/http/Endpoints.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ abstract class SpotifyEndpoint(val api: SpotifyApi<*, *>) {
5151
contentType: String? = null,
5252
attemptedRefresh: Boolean = false
5353
): String {
54-
if (api is SpotifyClientApi && getCurrentTimeMs() >= api.expireTime) {
54+
if (getCurrentTimeMs() >= api.expireTime) {
5555
if (!api.automaticRefresh) throw SpotifyException.AuthenticationException("The access token has expired.")
5656
else api.refreshToken()
5757
}

0 commit comments

Comments
 (0)