mirror of
https://github.com/netbirdio/netbird.git
synced 2026-10-25 05:49:06 +01:00
Update peer status when login expires (#688)
Extend PeerStatus with an extra field LoginExpired, that can be stored in the database.
This commit is contained in:
@@ -152,8 +152,6 @@ func toPeerResponse(peer *server.Peer, account *server.Account, dnsDomain string
|
||||
fqdn = peer.DNSLabel
|
||||
}
|
||||
|
||||
expired, _ := peer.LoginExpired(account.Settings)
|
||||
|
||||
return &api.Peer{
|
||||
Id: peer.ID,
|
||||
Name: peer.Name,
|
||||
@@ -170,6 +168,6 @@ func toPeerResponse(peer *server.Peer, account *server.Account, dnsDomain string
|
||||
DnsLabel: fqdn,
|
||||
LoginExpirationEnabled: peer.LoginExpirationEnabled,
|
||||
LastLogin: peer.LastLogin,
|
||||
LoginExpired: expired,
|
||||
LoginExpired: peer.Status.LoginExpired,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user