Commit 90e9b022 authored by qiuqunfeng's avatar qiuqunfeng
Browse files

Enhance WafService and ListWafsV2 response by adding ID field to improve data...

Enhance WafService and ListWafsV2 response by adding ID field to improve data representation and clarity in WAF listings.
parent 8a2a20e3
...@@ -71,6 +71,7 @@ func (c *WafController) ListWafsV2(ctx *gin.Context) { ...@@ -71,6 +71,7 @@ func (c *WafController) ListWafsV2(ctx *gin.Context) {
type wafService struct { type wafService struct {
Name string `json:"name"` Name string `json:"name"`
Namespace string `json:"namespace"` Namespace string `json:"namespace"`
ID uint32 `json:"id"`
} }
type resp struct { type resp struct {
...@@ -81,6 +82,7 @@ func (c *WafController) ListWafsV2(ctx *gin.Context) { ...@@ -81,6 +82,7 @@ func (c *WafController) ListWafsV2(ctx *gin.Context) {
for _, waf := range wafs { for _, waf := range wafs {
items = append(items, wafService{ items = append(items, wafService{
Name: waf.GatewayName, Name: waf.GatewayName,
ID: waf.ID,
}) })
} }
......
...@@ -164,6 +164,7 @@ type IPInfoPrivateResp struct { ...@@ -164,6 +164,7 @@ type IPInfoPrivateResp struct {
} }
type WafService struct { type WafService struct {
ID uint32 `json:"id"`
GatewayName string `json:"gateway_name"` GatewayName string `json:"gateway_name"`
Name string `json:"name"` Name string `json:"name"`
Mode string `json:"mode"` Mode string `json:"mode"`
......
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