mirror of
https://github.com/gravitl/netmaker.git
synced 2025-10-05 16:57:51 +08:00
update relay information if changed on host update
This commit is contained in:
@@ -222,3 +222,9 @@ func DeleteHostRelay(relayHostID string) (relayHost *models.Host, relayedHosts [
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// UpdateHostRelay - updates the relay host with new relayed hosts
|
||||
func UpdateHostRelay(relayHostID string, oldRelayedHosts, newRelayedHosts []string) {
|
||||
_ = SetRelayedHosts(false, relayHostID, oldRelayedHosts)
|
||||
_ = SetRelayedHosts(true, relayHostID, newRelayedHosts)
|
||||
}
|
||||
|
Reference in New Issue
Block a user