From f8c0d8b20350048f9b4079bb356d719fe503f955 Mon Sep 17 00:00:00 2001 From: johnypeng Date: Thu, 25 Jan 2024 21:25:55 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A7=A3=E5=86=B3=E4=B8=8B=E8=BD=BD?= =?UTF-8?q?=E7=A9=BA=E6=96=87=E4=BB=B6=E6=8A=A5=E9=94=99=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98=20(#2930)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bcs-services/bcs-bscp/pkg/audit/audit.go | 4 ++-- bcs-services/bcs-bscp/pkg/audit/middleware.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bcs-services/bcs-bscp/pkg/audit/audit.go b/bcs-services/bcs-bscp/pkg/audit/audit.go index 708a183137..cacc9a4033 100644 --- a/bcs-services/bcs-bscp/pkg/audit/audit.go +++ b/bcs-services/bcs-bscp/pkg/audit/audit.go @@ -195,9 +195,9 @@ var auditGrpcMap = map[string]func() (audit.Resource, audit.Action){ return audit.Resource{ResourceType: audit.ResourceType(sys.Application)}, audit.Action{ActionID: "list_config_item_by_tuple"} }, - "/pbcs.Config/GetReleasedKvReq": func() (audit.Resource, audit.Action) { + "/pbcs.Config/GetReleasedKv": func() (audit.Resource, audit.Action) { return audit.Resource{ResourceType: audit.ResourceType(sys.Application)}, - audit.Action{ActionID: "get_released_kv_req"} + audit.Action{ActionID: "get_released_kv"} }, "/pbcs.Config/ListReleasedKvs": func() (audit.Resource, audit.Action) { return audit.Resource{ResourceType: audit.ResourceType(sys.Application)}, diff --git a/bcs-services/bcs-bscp/pkg/audit/middleware.go b/bcs-services/bcs-bscp/pkg/audit/middleware.go index bb228e64d5..b56861af92 100644 --- a/bcs-services/bcs-bscp/pkg/audit/middleware.go +++ b/bcs-services/bcs-bscp/pkg/audit/middleware.go @@ -45,7 +45,7 @@ func Audit(next http.Handler) http.Handler { defer func() { status := ww.Status() msg := "Success" - if status != http.StatusOK { + if status >= http.StatusBadRequest { rs := struct { Error struct { Message string `json:"message"`