From 9b3f112a8e758d816d06b6a4e29fd1d16155b8e7 Mon Sep 17 00:00:00 2001 From: scorpiotzh <835598264@qq.com> Date: Tue, 30 May 2023 09:43:19 +0800 Subject: [PATCH] feat: Modify api log --- http_server/api_code/monitor.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/http_server/api_code/monitor.go b/http_server/api_code/monitor.go index 0f12011f..d190c77b 100644 --- a/http_server/api_code/monitor.go +++ b/http_server/api_code/monitor.go @@ -9,6 +9,7 @@ import ( "github.com/parnurzeal/gorequest" "github.com/scorpiotzh/mylog" "net/http" + "strings" "time" ) @@ -56,6 +57,9 @@ func DoMonitorLog(method string) gin.HandlerFunc { if resp.ErrNo == ApiCodeSignError { resp.ErrNo = ApiCodeSuccess } + if resp.ErrNo == ApiCodeParamsInvalid && strings.Contains(resp.ErrMsg, "expires soon") { + resp.ErrNo = ApiCodeSuccess + } pushLog := ReqPushLog{ Index: config.Cfg.Server.PushLogIndex, Method: method,