forked from Fascinated/Bat
fix access token refreshing?!??!
This commit is contained in:
parent
98e9003129
commit
6de1e8b2b1
@ -188,7 +188,8 @@ public class SpotifyService {
|
||||
*/
|
||||
@SneakyThrows
|
||||
public void ensureValidToken(SpotifyProfile profile, BatUser user) {
|
||||
if (profile.getExpiresAt() == null || profile.getExpiresAt() < System.currentTimeMillis()) {
|
||||
// If the token is still valid, return
|
||||
if (profile.getExpiresAt() > System.currentTimeMillis()) {
|
||||
return;
|
||||
}
|
||||
SpotifyApi api = new SpotifyApi.Builder()
|
||||
|
Loading…
Reference in New Issue
Block a user