Support for notes about clients

This commit is contained in:
0xCA 2024-01-09 19:26:24 +05:00
parent a22e807d2a
commit 986404236a
6 changed files with 33 additions and 3 deletions

View file

@ -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 {