Remove code duplicate on peer

Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com>
This commit is contained in:
bcmmbaga 2024-11-07 12:56:54 +03:00
parent 197d844a16
commit 2f7027194b
No known key found for this signature in database
GPG Key ID: 511EED5C928AD547

View File

@ -240,14 +240,6 @@ func (am *DefaultAccountManager) UpdatePeer(ctx context.Context, accountID, user
peer.SSHEnabled = update.SSHEnabled
sshChanged = true
}
if peer.SSHEnabled != update.SSHEnabled {
peer.SSHEnabled = update.SSHEnabled
event := activity.PeerSSHEnabled
if !update.SSHEnabled {
event = activity.PeerSSHDisabled
}
am.StoreEvent(ctx, userID, peer.IP.String(), accountID, event, peer.EventMeta(am.GetDNSDomain()))
}
if peer.Name != update.Name {
peer.Name = update.Name