fix: 初验针对修改
This commit is contained in:
@@ -25,6 +25,13 @@ func ListAuditLogs(ctx *gin.Context) {
|
||||
if v := strings.TrimSpace(ctx.Query("action")); v != "" {
|
||||
q = q.Where("action = ?", v)
|
||||
}
|
||||
if v := strings.TrimSpace(ctx.Query("log_category")); v != "" {
|
||||
if v != "operation" && v != "data" {
|
||||
infra.Response.Error(ctx, fmt.Errorf("log_category 参数无效"))
|
||||
return
|
||||
}
|
||||
q = q.Where("log_category = ?", v)
|
||||
}
|
||||
if v := strings.TrimSpace(ctx.Query("object_type")); v != "" {
|
||||
q = q.Where("object_type = ?", v)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user