add friendly_name param

This commit is contained in:
kadet77rus 2024-09-27 19:41:58 +03:00
parent 2fdafd34ca
commit dd8f4742e7
6 changed files with 27 additions and 7 deletions

View file

@ -481,6 +481,10 @@ func NewClient(db store.IStore) echo.HandlerFunc {
}
}
if client.FriendlyName == "" {
client.FriendlyName = client.Name + "-" + client.ID
}
if client.PresharedKey == "" {
presharedKey, err := wgtypes.GenerateKey()
if err != nil {