Commit 8fe0bf9c authored by qiuqunfeng's avatar qiuqunfeng
Browse files

Change WAF endpoint to use query parameters instead of path parameters

- Update `Waf` method in WafController to retrieve gateway details using query parameters
- Modify parameter extraction from `ctx.Param()` to `ctx.Query()`
- Maintain consistent method signature and service call logic
parent 2840d98a
...@@ -26,9 +26,10 @@ func (c *WafController) Waf(ctx *gin.Context) { ...@@ -26,9 +26,10 @@ func (c *WafController) Waf(ctx *gin.Context) {
ctx1, cancel := context.WithTimeout(context.Background(), 10*time.Second) ctx1, cancel := context.WithTimeout(context.Background(), 10*time.Second)
defer cancel() defer cancel()
gatewayName := ctx.Param("gateway_name") gatewayName := ctx.Query("gateway_name")
regionCode := ctx.Param("region_code") regionCode := ctx.Query("region_code")
namespace := ctx.Param("namespace") namespace := ctx.Query("namespace")
waf, err := c.service.GetWaf(ctx1, regionCode, namespace, gatewayName) waf, err := c.service.GetWaf(ctx1, regionCode, namespace, gatewayName)
if err != nil { if err != nil {
// logging.Get().Err(err).Msgf("get waf") // logging.Get().Err(err).Msgf("get waf")
......
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