规范API命名

This commit is contained in:
GoEdgeLab
2021-11-05 15:34:48 +08:00
parent d12cb70cb9
commit 36d8fc36bc
18 changed files with 31 additions and 31 deletions

View File

@@ -69,7 +69,7 @@ func (this *UpdateHostsAction) RunPost(params struct {
this.Fail("获取API节点列表失败错误信息" + err.Error())
}
var endpoints = []string{}
for _, node := range nodesResp.Nodes {
for _, node := range nodesResp.ApiNodes {
if !node.IsOn {
continue
}
@@ -144,7 +144,7 @@ func (this *UpdateHostsAction) RunPost(params struct {
// 保存
_, err = client.APINodeRPC().UpdateAPINode(client.Context(0), &pb.UpdateAPINodeRequest{
NodeId: node.Id,
ApiNodeId: node.Id,
Name: node.Name,
Description: node.Description,
HttpJSON: node.HttpJSON,

View File

@@ -64,7 +64,7 @@ func (this *ValidateApiAction) RunPost(params struct {
this.Fail("获取API节点列表失败错误信息" + err.Error())
}
var hosts = []string{}
for _, node := range nodesResp.Nodes {
for _, node := range nodesResp.ApiNodes {
if !node.IsOn {
continue
}