mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2025-01-05 17:13:32 +08:00
Fix: GET /rules format
This commit is contained in:
parent
f748e0405c
commit
ddc9f74a71
@ -15,8 +15,8 @@ func ruleRouter() http.Handler {
|
||||
}
|
||||
|
||||
type Rule struct {
|
||||
Name string `json:"name"`
|
||||
Payload string `json:"type"`
|
||||
Type string `json:"type"`
|
||||
Payload string `json:"payload"`
|
||||
Proxy string `json:"proxy"`
|
||||
}
|
||||
|
||||
@ -30,7 +30,7 @@ func getRules(w http.ResponseWriter, r *http.Request) {
|
||||
var rules []Rule
|
||||
for _, rule := range rawRules {
|
||||
rules = append(rules, Rule{
|
||||
Name: rule.RuleType().String(),
|
||||
Type: rule.RuleType().String(),
|
||||
Payload: rule.Payload(),
|
||||
Proxy: rule.Adapter(),
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user