2.6-Preview最后一批代码上线

This commit is contained in:
2026-08-07 21:18:28 +08:00
parent 41eb21f512
commit d7c27c513c
12 changed files with 322 additions and 122 deletions
+5
View File
@@ -188,6 +188,11 @@ func UpdateConfigHandler(c *gin.Context) {
}
cfg.TcpMux = true
// AdminPort 已从 JSON 绑定,直接使用
if cfg.AdminPort <= 0 {
cfg.AdminPort = 7400 // 如果前端没传,默认 7400
}
if err := db.UpdateGlobalConfig(&cfg); err != nil {
c.JSON(http.StatusInternalServerError, gin.H{"code": 2, "msg": "更新配置失败: " + err.Error()})
return