mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-07 18:50:26 +08:00
修复同属多集群下的节点无法删除线路的Bug
This commit is contained in:
@@ -1328,6 +1328,7 @@ func (this *NodeService) UpdateNodeDNS(ctx context.Context, req *pb.UpdateNodeDN
|
|||||||
delete(routeCodeMap, req.DnsDomainId)
|
delete(routeCodeMap, req.DnsDomainId)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
routeCodeMap = map[int64][]string{}
|
||||||
if len(req.Routes) > 0 {
|
if len(req.Routes) > 0 {
|
||||||
var m = map[int64][]string{} // domainId => codes
|
var m = map[int64][]string{} // domainId => codes
|
||||||
for _, route := range req.Routes {
|
for _, route := range req.Routes {
|
||||||
@@ -1342,9 +1343,6 @@ func (this *NodeService) UpdateNodeDNS(ctx context.Context, req *pb.UpdateNodeDN
|
|||||||
for domainId, codes := range m {
|
for domainId, codes := range m {
|
||||||
routeCodeMap[domainId] = codes
|
routeCodeMap[domainId] = codes
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
// 清空
|
|
||||||
routeCodeMap = map[int64][]string{}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user