Commit 11009cf4 authored by qiuqunfeng's avatar qiuqunfeng
Browse files

Fix typo in WafRuleCategory struct and update related references

- Correct the field name from 'Catagory' to 'Category' in WafRuleCategory struct
- Update references in SaveRuleCategoryToDB method to reflect the corrected field name
- Ensure consistency in category naming across the WAF service
parent ef401310
...@@ -270,7 +270,7 @@ type Description struct { ...@@ -270,7 +270,7 @@ type Description struct {
type WafRuleCategory struct { type WafRuleCategory struct {
CategoryID string `json:"category_id"` CategoryID string `json:"category_id"`
Status int `json:"status,omitempty"` Status int `json:"status,omitempty"`
Catagory Catagory `json:"catagory"` Category Catagory `json:"category"`
Description Description `json:"description"` Description Description `json:"description"`
Rules []WafRule `json:"rules"` Rules []WafRule `json:"rules"`
} }
......
...@@ -373,8 +373,8 @@ func (s *wafService) SaveRuleCategoryToDB(ctx context.Context) error { ...@@ -373,8 +373,8 @@ func (s *wafService) SaveRuleCategoryToDB(ctx context.Context) error {
model := model.WafRuleCategory{ model := model.WafRuleCategory{
CategoryID: category.CategoryID, CategoryID: category.CategoryID,
Status: category.Status, Status: category.Status,
CategoryEN: category.Catagory.EN, CategoryEN: category.Category.EN,
CategoryZH: category.Catagory.Zh, CategoryZH: category.Category.Zh,
DescriptionEN: category.Description.EN, DescriptionEN: category.Description.EN,
DescriptionZH: category.Description.Zh, DescriptionZH: category.Description.Zh,
Rules: model.RuleList(rules), Rules: model.RuleList(rules),
......
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