proxy updates refactor changes

This commit is contained in:
Abhishek Kondur
2023-01-08 18:50:02 +05:30
parent 023f29ee71
commit 95b578455d
4 changed files with 214 additions and 35 deletions

View File

@@ -8,7 +8,6 @@ import (
"strings"
"github.com/gorilla/mux"
proxy_models "github.com/gravitl/netclient/nmproxy/models"
"github.com/gravitl/netmaker/database"
"github.com/gravitl/netmaker/logger"
"github.com/gravitl/netmaker/logic"
@@ -1061,12 +1060,6 @@ func deleteNode(w http.ResponseWriter, r *http.Request) {
logic.ReturnErrorResponse(w, r, logic.FormatError(fmt.Errorf("failed to delete node"), "internal"))
return
}
if host.ProxyEnabled {
mq.ProxyUpdate(&proxy_models.ProxyManagerPayload{
Action: proxy_models.DeleteNetwork,
Network: node.Network,
}, &node)
}
if fromNode {
// update networks for host mq client
currNets := logic.GetHostNetworks(host.ID.String())