refactor server routing

This commit is contained in:
Matthew R. Kasun
2022-08-19 11:25:39 -04:00
parent f569830910
commit 184e5a66d9
4 changed files with 9 additions and 48 deletions

View File

@@ -39,7 +39,7 @@ func networkHandlers(r *mux.Router) {
r.HandleFunc("/api/networks/{networkname}/acls", securityCheck(true, http.HandlerFunc(getNetworkACL))).Methods("GET")
}
//simple get all networks function
// simple get all networks function
func getNetworks(w http.ResponseWriter, r *http.Request) {
headerNetworks := r.Header.Get("networks")
@@ -216,9 +216,7 @@ func updateNetwork(w http.ResponseWriter, r *http.Request) {
return
}
for _, node := range nodes {
if err = mq.NodeUpdate(&node); err != nil {
logger.Log(1, "failed to send update to node during a network wide update", node.Name, node.ID, err.Error())
}
runUpdates(&node, true)
}
}