From f11f8b3e0ee56c6d751e9fdce9a1b4e6fcdff20d Mon Sep 17 00:00:00 2001 From: wangchuxiao Date: Fri, 8 Apr 2022 18:27:20 +0800 Subject: [PATCH] getui --- internal/push/getui/push.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/push/getui/push.go b/internal/push/getui/push.go index b568d4219..8139eea0b 100644 --- a/internal/push/getui/push.go +++ b/internal/push/getui/push.go @@ -84,7 +84,7 @@ func (g *Getui) Push(userIDList []string, alert, detailContent, platform, operat return "", utils.Wrap(err, "Auth failed") } log.NewInfo(operationID, "getui", utils.GetSelfFuncName(), token, expireTime, err) - err = db.DB.SetGetuiToken(token, expireTime-time.Now().Unix()-20) + err = db.DB.SetGetuiToken(token, 60*60*23) if err != nil { return "", utils.Wrap(err, "Auth failed") } @@ -114,7 +114,7 @@ func (g *Getui) Push(userIDList []string, alert, detailContent, platform, operat } func (g *Getui) Auth(operationID string, timeStamp int64) (token string, expireTime int64, err error) { - log.NewInfo(operationID, utils.GetSelfFuncName(), timeStamp) + log.NewInfo(operationID, utils.GetSelfFuncName(), config.Config.Push.Getui.AppKey, timeStamp, config.Config.Push.Getui.MasterSecret) h := sha256.New() h.Write([]byte(config.Config.Push.Getui.AppKey + strconv.Itoa(int(timeStamp)) + config.Config.Push.Getui.MasterSecret)) sum := h.Sum(nil)