pull/218/head
wangchuxiao 3 years ago
parent a08c499c95
commit 72146c08ae

@ -126,6 +126,7 @@ func (g *Getui) Auth(operationID string, timeStamp int64) (token string, expireT
Appkey: config.Config.Push.Getui.AppKey, Appkey: config.Config.Push.Getui.AppKey,
} }
respAuth := AuthResp{} respAuth := AuthResp{}
err = g.request(AuthURL, reqAuth, "", &respAuth, operationID) err = g.request(AuthURL, reqAuth, "", &respAuth, operationID)
if err != nil { if err != nil {
return "", 0, err return "", 0, err
@ -160,7 +161,9 @@ func (g *Getui) request(url string, content interface{}, token string, returnStr
return err return err
} }
log.NewInfo(operationID, "getui", utils.GetSelfFuncName(), "resp, ", string(result)) log.NewInfo(operationID, "getui", utils.GetSelfFuncName(), "resp, ", string(result))
if err := json.Unmarshal(result, returnStruct); err != nil { commonResp := GetuiCommonResp{}
commonResp.Data = returnStruct
if err := json.Unmarshal(result, commonResp); err != nil {
return err return err
} }
return nil return nil

Loading…
Cancel
Save