mirror of
https://github.com/gravitl/netmaker.git
synced 2025-10-13 12:34:30 +08:00
send host update to join network
This commit is contained in:
@@ -207,7 +207,13 @@ func addHostToNetwork(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
logger.Log(1, "added new node", newNode.ID.String(), "to host", currHost.Name)
|
||||
|
||||
if err = mq.HostUpdate(&models.HostUpdate{
|
||||
Action: models.JoinHostToNetwork,
|
||||
Host: *currHost,
|
||||
Node: *newNode,
|
||||
}); err != nil {
|
||||
logger.Log(0, r.Header.Get("user"), "failed to update host to join network:", hostid, network, err.Error())
|
||||
}
|
||||
networks := logic.GetHostNetworks(currHost.ID.String())
|
||||
if len(networks) > 0 {
|
||||
if err = mq.ModifyClient(&mq.MqClient{
|
||||
|
Reference in New Issue
Block a user