|
@@ -407,6 +407,9 @@ func (s *aoDunService) SetDefense(ctx context.Context, req v1.SetDefense) error
|
|
|
if err := json.Unmarshal(resBody, &res); err != nil {
|
|
|
return fmt.Errorf("反序列化响应 JSON 失败 (内容: %s): %w", string(resBody), err)
|
|
|
}
|
|
|
+ if res.Msg == "当前ip已是此防御值" {
|
|
|
+ return nil
|
|
|
+ }
|
|
|
if res.Code != 200 {
|
|
|
return fmt.Errorf("API 错误: code %d, msg '%s'", res.Code, res.Msg)
|
|
|
}
|