️ Improve

This commit is contained in:
2024-08-11 23:55:47 +08:00
parent dedbf2bc03
commit 3cfa4bdf24
24 changed files with 204 additions and 304 deletions

View File

@ -6,7 +6,7 @@ type ShortLinkGenValidator struct {
}
type GetUrlValidator struct {
Hash string `form:"hash" binding:"required"` // Hash: 短链接
Hash string `form:"hash" binding:"required"`
Password string `form:"password"`
}

View File

@ -111,7 +111,7 @@ func ParseQuery(c *gin.Context) (SubValidator, error) {
},
)
}
// 校验 Rule-Provider 是否有重名
names := make(map[string]bool)
for _, ruleProvider := range query.RuleProviders {
if _, ok := names[ruleProvider.Name]; ok {