Skip to content

Commit

Permalink
Merge pull request #34 from G-Core/check-weight
Browse files Browse the repository at this point in the history
omitempty for rules weight
  • Loading branch information
freenoth authored Mar 23, 2023
2 parents b63f8de + 503ee70 commit 851ed2a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rules/rules.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ type CreateRequest struct {
Rule string `json:"rule,omitempty"`
RuleType int `json:"ruleType"`
OriginGroup *int `json:"originGroup"`
Weight int `json:"weight"`
Weight int `json:"weight,omitempty"`
OverrideOriginProtocol *string `json:"overrideOriginProtocol"`
Options *gcore.Options `json:"options,omitempty"`
}
Expand All @@ -27,7 +27,7 @@ type UpdateRequest struct {
Name string `json:"name,omitempty"`
Rule string `json:"rule,omitempty"`
RuleType int `json:"ruleType"`
Weight int `json:"weight"`
Weight int `json:"weight,omitempty"`
OriginGroup *int `json:"originGroup"`
OverrideOriginProtocol *string `json:"overrideOriginProtocol"`
Options *gcore.Options `json:"options,omitempty"`
Expand Down

0 comments on commit 851ed2a

Please sign in to comment.