add groupRules

This commit is contained in:
2025-04-20 13:03:06 +10:00
parent 87e06ffc67
commit ed3d2e9e64
9 changed files with 116 additions and 74 deletions

View File

@ -39,6 +39,13 @@ func Convert(c *gin.Context) {
})
return
}
groupRules := make(map[string][]string)
err = json.Unmarshal([]byte(data.GroupRules), &groupRules)
if err != nil {
c.JSON(400, gin.H{
"error": err.Error(),
})
}
result, err := common.Convert(
data.Subscriptions,
data.Proxies,
@ -49,6 +56,7 @@ func Convert(c *gin.Context) {
data.GroupType,
data.SortKey,
data.SortType,
groupRules,
)
if err != nil {
c.JSON(400, gin.H{