操作日志记录排除Get开头的非Get请求
This commit is contained in:
@@ -23,6 +23,9 @@ func AddOperateEvent(ctx *jxcontext.Context, accessUUID string) (err error) {
|
|||||||
if url != "" {
|
if url != "" {
|
||||||
apiFunction = url[strings.LastIndex(url, "/")+1 : len(url)]
|
apiFunction = url[strings.LastIndex(url, "/")+1 : len(url)]
|
||||||
}
|
}
|
||||||
|
if apiFunction[0:2] == "Get" {
|
||||||
|
return err
|
||||||
|
}
|
||||||
event := &model.OperateEvent{
|
event := &model.OperateEvent{
|
||||||
CreatedAt: time.Now(),
|
CreatedAt: time.Now(),
|
||||||
LastOperator: ctx.GetUserName(),
|
LastOperator: ctx.GetUserName(),
|
||||||
|
|||||||
@@ -35,3 +35,14 @@ func (c *EventController) GetOperateEvents() {
|
|||||||
return retVal, "", err
|
return retVal, "", err
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// @Title 各平台Cookie检查
|
||||||
|
// @Description 各平台Cookie检查
|
||||||
|
// @Param token header string true "认证token"
|
||||||
|
// @Param vendorIDs query string false "平台ID列表"
|
||||||
|
// @Success 200 {object} controllers.CallResult
|
||||||
|
// @Failure 200 {object} controllers.CallResult
|
||||||
|
// @router /GetCheckVendorCookie [get]
|
||||||
|
func (c *EventController) GetCheckVendorCookie() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user