mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-11 18:30:25 +08:00
修正因为没有选择线路而导致创建和修改节点的问题
This commit is contained in:
@@ -95,11 +95,13 @@ func (this *CreateNodeAction) RunPost(params struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dnsRouteCodes := []string{}
|
dnsRouteCodes := []string{}
|
||||||
|
if len(params.DnsRoutesJSON) > 0 {
|
||||||
err := json.Unmarshal(params.DnsRoutesJSON, &dnsRouteCodes)
|
err := json.Unmarshal(params.DnsRoutesJSON, &dnsRouteCodes)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
this.ErrorPage(err)
|
this.ErrorPage(err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// TODO 检查登录授权
|
// TODO 检查登录授权
|
||||||
loginInfo := &pb.NodeLogin{
|
loginInfo := &pb.NodeLogin{
|
||||||
|
|||||||
@@ -206,11 +206,13 @@ func (this *UpdateAction) RunPost(params struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dnsRouteCodes := []string{}
|
dnsRouteCodes := []string{}
|
||||||
|
if len(params.DnsRoutesJSON) > 0 {
|
||||||
err := json.Unmarshal(params.DnsRoutesJSON, &dnsRouteCodes)
|
err := json.Unmarshal(params.DnsRoutesJSON, &dnsRouteCodes)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
this.ErrorPage(err)
|
this.ErrorPage(err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// TODO 检查登录授权
|
// TODO 检查登录授权
|
||||||
loginInfo := &pb.NodeLogin{
|
loginInfo := &pb.NodeLogin{
|
||||||
@@ -225,7 +227,7 @@ func (this *UpdateAction) RunPost(params struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 保存
|
// 保存
|
||||||
_, err = this.RPC().NodeRPC().UpdateNode(this.AdminContext(), &pb.UpdateNodeRequest{
|
_, err := this.RPC().NodeRPC().UpdateNode(this.AdminContext(), &pb.UpdateNodeRequest{
|
||||||
NodeId: params.NodeId,
|
NodeId: params.NodeId,
|
||||||
GroupId: params.GroupId,
|
GroupId: params.GroupId,
|
||||||
Name: params.Name,
|
Name: params.Name,
|
||||||
|
|||||||
Reference in New Issue
Block a user