将api.yaml修改为api_admin.yaml

This commit is contained in:
刘祥超
2023-08-12 17:58:00 +08:00
parent cbce8a9934
commit df19a04ad1
19 changed files with 113 additions and 114 deletions

View File

@@ -65,7 +65,7 @@ func (this *SyncAPINodesTask) Loop() error {
}
// 是否禁止自动升级
if config.RPC.DisableUpdate {
if config.RPCDisableUpdate {
return nil
}
@@ -88,7 +88,7 @@ func (this *SyncAPINodesTask) Loop() error {
}
// 和现有的对比
if this.isSame(newEndpoints, config.RPC.Endpoints) {
if this.isSame(newEndpoints, config.RPCEndpoints) {
return nil
}
@@ -99,14 +99,14 @@ func (this *SyncAPINodesTask) Loop() error {
}
// 修改RPC对象配置
config.RPC.Endpoints = newEndpoints
config.RPCEndpoints = newEndpoints
err = rpcClient.UpdateConfig(config)
if err != nil {
return err
}
// 保存到文件
err = config.WriteFile(Tea.ConfigFile("api.yaml"))
err = config.WriteFile(Tea.ConfigFile(configs.ConfigFileName))
if err != nil {
return err
}