Skip to content

Commit

Permalink
feat: Modify api log
Browse files Browse the repository at this point in the history
  • Loading branch information
scorpiotzh committed May 30, 2023
1 parent 361ed27 commit 9b3f112
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions http_server/api_code/monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"github.com/parnurzeal/gorequest"
"github.com/scorpiotzh/mylog"
"net/http"
"strings"
"time"
)

Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 9b3f112

Please sign in to comment.