Fix token return type in paramset.go

This commit is contained in:
renzhiyuan 2025-05-14 11:26:18 +08:00
parent b0fc0e3600
commit 3fd9995b0f
1 changed files with 1 additions and 1 deletions

View File

@ -44,7 +44,7 @@ func (m *MessageCenter) getAccessToken() (string, error) {
if tokenInstance, exist := cache.InstanceCacheMap().Get(m.ClientKey); exist { if tokenInstance, exist := cache.InstanceCacheMap().Get(m.ClientKey); exist {
data = tokenInstance.(accessTokenResponse) data = tokenInstance.(accessTokenResponse)
if int64(data.AccessExpire) >= time.Now().Unix() { if int64(data.AccessExpire) >= time.Now().Unix() {
return tokenInstance.(string), nil return data.AccessToken, nil
} }
} }
var authParam, _ = json.Marshal(map[string]string{"client_key": m.ClientKey, "client_secret": m.ClientSecret}) var authParam, _ = json.Marshal(map[string]string{"client_key": m.ClientKey, "client_secret": m.ClientSecret})