add global config support

This commit is contained in:
wjqserver 2025-06-30 15:31:14 +08:00
parent cd1e1a42f3
commit 34d553a890
23 changed files with 1682 additions and 343 deletions

View file

@ -35,7 +35,7 @@ func PutConfig(cdb *db.ConfigDB, cfg *config.Config) touka.HandlerFunc {
var config gen.CaddyUniConfig
err := c.ShouldBindJSON(&config)
if err != nil {
c.JSON(500, touka.H{"error": err.Error()})
c.JSON(400, touka.H{"error": err.Error()})
return
}