将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

@@ -102,14 +102,9 @@ func (this *ValidateApiAction) RunPost(params struct {
Field("oldNodeSecret", params.OldNodeSecret).
Require("请输入节点secret")
client, err := rpc.NewRPCClient(&configs.APIConfig{
RPC: struct {
Endpoints []string `yaml:"endpoints"`
DisableUpdate bool `yaml:"disableUpdate"`
}{
Endpoints: []string{params.OldProtocol + "://" + configutils.QuoteIP(params.OldHost) + ":" + params.OldPort},
},
NodeId: params.OldNodeId,
Secret: params.OldNodeSecret,
RPCEndpoints: []string{params.OldProtocol + "://" + configutils.QuoteIP(params.OldHost) + ":" + params.OldPort},
NodeId: params.OldNodeId,
Secret: params.OldNodeSecret,
}, false)
if err != nil {
this.FailField("oldHost", "测试API节点时出错请检查配置错误信息"+err.Error())