From f0037fb880e10ff98adecfa190e7e7eb4de4ebb1 Mon Sep 17 00:00:00 2001 From: "Matthew R. Kasun" Date: Fri, 4 Feb 2022 11:40:29 -0500 Subject: [PATCH] publish updates on key change from ui --- controllers/network.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/controllers/network.go b/controllers/network.go index 0a78b64c..2bc3b2ac 100644 --- a/controllers/network.go +++ b/controllers/network.go @@ -98,6 +98,14 @@ func keyUpdate(w http.ResponseWriter, r *http.Request) { logger.Log(2, r.Header.Get("user"), "updated key on network", netname) w.WriteHeader(http.StatusOK) json.NewEncoder(w).Encode(network) + nodes, err := logic.GetNetworkNodes(netname) + if err != nil { + logger.Log(2, "failed to retrieve network nodes for network", netname, err.Error()) + return + } + for _, node := range nodes { + runUpdates(&node, true) + } } // Update a network