api: fix validation and http response

This commit is contained in:
yusing
2025-01-04 09:01:52 +08:00
parent 112859caa5
commit c30d3f585f
6 changed files with 33 additions and 16 deletions

View File

@@ -67,8 +67,8 @@ func Load() (*Config, E.Error) {
}
func Validate(data []byte) E.Error {
var model *types.Config
return utils.DeserializeYAML(data, model)
var model types.Config
return utils.DeserializeYAML(data, &model)
}
func MatchDomains() []string {