try to improve web client credentials page

I should do the same for the admin page too
This commit is contained in:
Nicola Murino
2021-05-22 09:54:27 +02:00
parent 0cb5c49cf3
commit b9bc8d722d
4 changed files with 69 additions and 11 deletions

View File

@@ -370,9 +370,7 @@ func handleWebClientManageKeysPost(w http.ResponseWriter, r *http.Request) {
renderCredentialsPage(w, r, "", err.Error())
return
}
publicKeysFormValue := r.Form.Get("public_keys")
publicKeys := getSliceFromDelimitedValues(publicKeysFormValue, "\n")
user.PublicKeys = publicKeys
user.PublicKeys = r.Form["public_keys"]
err = dataprovider.UpdateUser(&user)
if err != nil {
renderCredentialsPage(w, r, "", err.Error())