Fix token return type in paramset.go
This commit is contained in:
parent
b0fc0e3600
commit
3fd9995b0f
|
@ -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})
|
||||||
|
|
Loading…
Reference in New Issue