Commit 2e951857 authored by qiuqunfeng's avatar qiuqunfeng
Browse files

fix

parent 1bea5ab0
...@@ -48,7 +48,25 @@ func (c *WafController) CreateWaf(ctx *gin.Context) { ...@@ -48,7 +48,25 @@ func (c *WafController) CreateWaf(ctx *gin.Context) {
return return
} }
for _, r := range req { for _, r := range req {
c.service.CreateWaf(ctx1, &r) _, err := c.service.CreateWaf(ctx1, &r)
if err != nil {
utils.AssembleResponse(ctx, nil, err)
return
}
} }
utils.AssembleResponse(ctx, nil, nil) utils.AssembleResponse(ctx, nil, nil)
} }
// `
// curl -X POST http://127.0.0.1:8080/v1/api/waf \
// -H "Content-Type: application/json" \
// -d '[
// {
// "region_code": "cn-east-1",
// "gatewayname": "istio-ingressgateway",
// "namespace": "istio-system",
// "port": 80,
// "host": ["*"]
// }
// ]'
// `
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment