This commit is contained in:
邹宗楠
2022-10-09 13:52:34 +08:00
parent 665653c4ed
commit 1fc2ff91f1
3 changed files with 9 additions and 2 deletions

View File

@@ -44,7 +44,7 @@ func New(appKey, appSecret, accessToken string) *API {
expiresIn: access.ExpiresIn,
accessTokenObj: access,
}
if access.ExpiresIn > time.Now().Unix() {
if access.ExpiresIn < time.Now().Unix() {
api.RefreshToken()
}
return api