操作日志记录排除Get开头的非Get请求

This commit is contained in:
苏尹岚
2020-01-16 11:26:04 +08:00
parent 7201eda9cb
commit 0d5494d29d
2 changed files with 14 additions and 0 deletions

View File

@@ -23,6 +23,9 @@ func AddOperateEvent(ctx *jxcontext.Context, accessUUID string) (err error) {
if url != "" {
apiFunction = url[strings.LastIndex(url, "/")+1 : len(url)]
}
if apiFunction[0:2] == "Get" {
return err
}
event := &model.OperateEvent{
CreatedAt: time.Now(),
LastOperator: ctx.GetUserName(),