mirror of https://github.com/h44z/wg-portal.git
fix: displayname generate in newpeer
This commit is contained in:
parent
79f227752e
commit
b44c19bb8c
|
|
@ -163,7 +163,9 @@ func (p ProvisioningService) NewPeer(ctx context.Context, req models.Provisionin
|
|||
peer.PresharedKey = domain.PreSharedKey(req.PresharedKey)
|
||||
}
|
||||
|
||||
if peer.DisplayName == "" {
|
||||
if req.DisplayName != "" {
|
||||
peer.DisplayName = req.DisplayName
|
||||
} else {
|
||||
peer.GenerateDisplayName("API")
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue