Selaa lähdekoodia

refactor(waf): 移除冗余的实例配置检查

- 删除了对 gatewayGroupIps长度的检查,因为该检查可能是不必要的
- 简化了错误处理流程,提高了代码的可读性和维护性
fusu 2 viikkoa sitten
vanhempi
sitoutus
ede36c0c21
1 muutettua tiedostoa jossa 0 lisäystä ja 4 poistoa
  1. 0 4
      internal/service/api/waf/allowanddenyip.go

+ 0 - 4
internal/service/api/waf/allowanddenyip.go

@@ -148,10 +148,6 @@ func (s *allowAndDenyIpService) DeleteAllowAndDenyIps(ctx context.Context, req v
 			return err
 		}
 
-		if len(gatewayGroupIps) == 0 {
-			return fmt.Errorf("请先配置实例")
-		}
-
 
 		ip, err := s.GetAllowAndDenyIp(ctx, int64(id))
 		if err != nil {