mirror of
				https://github.com/TeaOSLab/EdgeAPI.git
				synced 2025-11-04 07:50:25 +08:00 
			
		
		
		
	优化TOA相关代码
This commit is contained in:
		@@ -647,10 +647,10 @@ func (this *NodeClusterDAO) FindClusterTOAConfig(tx *dbs.Tx, clusterId int64, ca
 | 
			
		||||
		return nil, err
 | 
			
		||||
	}
 | 
			
		||||
	if !IsNotNull([]byte(toa)) {
 | 
			
		||||
		return nodeconfigs.DefaultTOAConfig(), nil
 | 
			
		||||
		return nodeconfigs.NewTOAConfig(), nil
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	config := &nodeconfigs.TOAConfig{}
 | 
			
		||||
	var config = nodeconfigs.NewTOAConfig()
 | 
			
		||||
	err = json.Unmarshal([]byte(toa), config)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return nil, err
 | 
			
		||||
 
 | 
			
		||||
@@ -1102,7 +1102,7 @@ func (this *NodeClusterService) FindEnabledNodeClusterConfigInfo(ctx context.Con
 | 
			
		||||
 | 
			
		||||
	// toa
 | 
			
		||||
	if models.IsNotNull(cluster.Toa) {
 | 
			
		||||
		var toaConfig = &nodeconfigs.TOAConfig{}
 | 
			
		||||
		var toaConfig = nodeconfigs.NewTOAConfig()
 | 
			
		||||
		err = json.Unmarshal(cluster.Toa, toaConfig)
 | 
			
		||||
		if err != nil {
 | 
			
		||||
			return nil, err
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user