diff --git a/handler/routes.go b/handler/routes.go index ef01d08..42047dc 100644 --- a/handler/routes.go +++ b/handler/routes.go @@ -720,6 +720,7 @@ func UpdateClient(db store.IStore) echo.HandlerFunc { client.PublicKey = _client.PublicKey client.PresharedKey = _client.PresharedKey client.UpdatedAt = time.Now().UTC() + client.AdditionalNotes = strings.ReplaceAll(strings.Trim(_client.AdditionalNotes, "\r\n"), "\r\n", "\n") // write to the database if err := db.SaveClient(client); err != nil { diff --git a/model/client.go b/model/client.go index cb00016..d835124 100644 --- a/model/client.go +++ b/model/client.go @@ -18,6 +18,7 @@ type Client struct { AllowedIPs []string `json:"allowed_ips"` ExtraAllowedIPs []string `json:"extra_allowed_ips"` Endpoint string `json:"endpoint"` + AdditionalNotes string `json:"additional_notes"` UseServerDNS bool `json:"use_server_dns"` Enabled bool `json:"enabled"` CreatedAt time.Time `json:"created_at"` diff --git a/templates/base.html b/templates/base.html index ab086e1..b45eb6c 100644 --- a/templates/base.html +++ b/templates/base.html @@ -288,6 +288,10 @@ +