From 72146c08ae9f9d04bf0e33053382568cbea869ff Mon Sep 17 00:00:00 2001 From: wangchuxiao Date: Fri, 8 Apr 2022 19:18:00 +0800 Subject: [PATCH] getui --- internal/push/getui/push.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/internal/push/getui/push.go b/internal/push/getui/push.go index 253830373..fbdf3c778 100644 --- a/internal/push/getui/push.go +++ b/internal/push/getui/push.go @@ -126,6 +126,7 @@ func (g *Getui) Auth(operationID string, timeStamp int64) (token string, expireT Appkey: config.Config.Push.Getui.AppKey, } respAuth := AuthResp{} + err = g.request(AuthURL, reqAuth, "", &respAuth, operationID) if err != nil { return "", 0, err @@ -160,7 +161,9 @@ func (g *Getui) request(url string, content interface{}, token string, returnStr return err } 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 nil