fix access token refreshing?!??!
All checks were successful
Deploy to Dokku / docker (ubuntu-latest) (push) Successful in 52s
All checks were successful
Deploy to Dokku / docker (ubuntu-latest) (push) Successful in 52s
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