更新配置
This commit is contained in:
@ -135,8 +135,13 @@ func (h *ConfigHandler) UpdateConfig(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
log.Printf("配置更新成功")
|
||||
// 更新运行时配置
|
||||
h.cfg = &newConfig
|
||||
|
||||
// 重新初始化 AI 负载均衡器
|
||||
config.ResetAIBalancer(newConfig.AIs)
|
||||
|
||||
log.Printf("配置更新成功")
|
||||
c.JSON(http.StatusOK, gin.H{"message": "配置更新成功"})
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user