mirror of
https://github.com/yusing/godoxy.git
synced 2026-03-18 23:33:51 +01:00
refactor(api/rules): remove IsResponseRule field from ParsedRule and related logic
This commit is contained in:
@@ -5093,11 +5093,6 @@
|
||||
"x-nullable": false,
|
||||
"x-omitempty": false
|
||||
},
|
||||
"isResponseRule": {
|
||||
"type": "boolean",
|
||||
"x-nullable": false,
|
||||
"x-omitempty": false
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"x-nullable": false,
|
||||
|
||||
@@ -891,8 +891,6 @@ definitions:
|
||||
properties:
|
||||
do:
|
||||
type: string
|
||||
isResponseRule:
|
||||
type: boolean
|
||||
name:
|
||||
type: string
|
||||
"on":
|
||||
@@ -1837,12 +1835,12 @@ definitions:
|
||||
type: string
|
||||
kernel_version:
|
||||
type: string
|
||||
load_avg_5m:
|
||||
type: string
|
||||
load_avg_15m:
|
||||
type: string
|
||||
load_avg_1m:
|
||||
type: string
|
||||
load_avg_5m:
|
||||
type: string
|
||||
mem_pct:
|
||||
type: string
|
||||
mem_total:
|
||||
|
||||
@@ -64,7 +64,6 @@ type ParsedRule struct {
|
||||
On string `json:"on"`
|
||||
Do string `json:"do"`
|
||||
ValidationError error `json:"validationError,omitempty"` // we need the structured error, not the plain string
|
||||
IsResponseRule bool `json:"isResponseRule"`
|
||||
} // @name ParsedRule
|
||||
|
||||
type FinalRequest struct {
|
||||
@@ -298,7 +297,6 @@ func parseRules(rawRules []RawRule) ([]ParsedRule, rules.Rules, error) {
|
||||
On: onStr,
|
||||
Do: doStr,
|
||||
ValidationError: validationErr,
|
||||
// IsResponseRule: rule.Requirement()&rules.RequirementFlagResponse != 0,
|
||||
})
|
||||
|
||||
// Only add valid rules to execution list
|
||||
|
||||
Reference in New Issue
Block a user