mirror of
				https://github.com/TeaOSLab/EdgeAdmin.git
				synced 2025-11-04 05:00:25 +08:00 
			
		
		
		
	修正因为没有选择线路而导致创建和修改节点的问题
This commit is contained in:
		@@ -95,10 +95,12 @@ func (this *CreateNodeAction) RunPost(params struct {
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	dnsRouteCodes := []string{}
 | 
			
		||||
	err := json.Unmarshal(params.DnsRoutesJSON, &dnsRouteCodes)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		this.ErrorPage(err)
 | 
			
		||||
		return
 | 
			
		||||
	if len(params.DnsRoutesJSON) > 0 {
 | 
			
		||||
		err := json.Unmarshal(params.DnsRoutesJSON, &dnsRouteCodes)
 | 
			
		||||
		if err != nil {
 | 
			
		||||
			this.ErrorPage(err)
 | 
			
		||||
			return
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	// TODO 检查登录授权
 | 
			
		||||
 
 | 
			
		||||
@@ -206,10 +206,12 @@ func (this *UpdateAction) RunPost(params struct {
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	dnsRouteCodes := []string{}
 | 
			
		||||
	err := json.Unmarshal(params.DnsRoutesJSON, &dnsRouteCodes)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		this.ErrorPage(err)
 | 
			
		||||
		return
 | 
			
		||||
	if len(params.DnsRoutesJSON) > 0 {
 | 
			
		||||
		err := json.Unmarshal(params.DnsRoutesJSON, &dnsRouteCodes)
 | 
			
		||||
		if err != nil {
 | 
			
		||||
			this.ErrorPage(err)
 | 
			
		||||
			return
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	// TODO 检查登录授权
 | 
			
		||||
@@ -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,
 | 
			
		||||
		GroupId:     params.GroupId,
 | 
			
		||||
		Name:        params.Name,
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user