mirror of
https://github.com/gravitl/netmaker.git
synced 2025-09-10 23:24:32 +08:00
set proxy action based on proxy status
This commit is contained in:
parent
20cf3b00bc
commit
45ea3be347
1 changed files with 6 additions and 1 deletions
|
@ -93,7 +93,12 @@ func PublishSingleHostPeerUpdate(ctx context.Context, host *models.Host, deleted
|
|||
return err
|
||||
}
|
||||
proxyUpdate.Server = servercfg.GetServer()
|
||||
proxyUpdate.Action = models.ProxyUpdate
|
||||
if host.ProxyEnabled {
|
||||
proxyUpdate.Action = models.ProxyUpdate
|
||||
} else {
|
||||
proxyUpdate.Action = models.NoProxy
|
||||
}
|
||||
|
||||
peerUpdate.ProxyUpdate = proxyUpdate
|
||||
|
||||
data, err := json.Marshal(&peerUpdate)
|
||||
|
|
Loading…
Add table
Reference in a new issue