From 9a7e0a7da01a9f9625ceaca0c61a59c540c6438f Mon Sep 17 00:00:00 2001 From: wangpengfei <274878379@qq.com> Date: 星期五, 18 八月 2023 17:32:10 +0800 Subject: [PATCH] fix --- api/v1/faultType.go | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/api/v1/faultType.go b/api/v1/faultType.go index 2b2beb5..233652f 100644 --- a/api/v1/faultType.go +++ b/api/v1/faultType.go @@ -71,6 +71,10 @@ if !ok { return } + if params.Id == 0 { + ctx.Fail(ecode.ParamsErr) + } + params.FaultType.Id = params.Id errCode := service.NewFaultTypeService().UpdateFaultType(¶ms.FaultType) if errCode != ecode.OK { -- Gitblit v1.8.0