mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 23:00:55 +03:00
rename public_key in public_keys
remove compatibility layer to convert public keys newline delimited in json list
This commit is contained in:
@@ -65,7 +65,7 @@ func getUserByID(w http.ResponseWriter, r *http.Request) {
|
||||
user, err := dataprovider.GetUserByID(dataProvider, userID)
|
||||
if err == nil {
|
||||
user.Password = ""
|
||||
user.PublicKey = []string{}
|
||||
user.PublicKeys = []string{}
|
||||
render.JSON(w, r, user)
|
||||
} else if err == sql.ErrNoRows {
|
||||
sendAPIResponse(w, r, err, "", http.StatusNotFound)
|
||||
@@ -86,7 +86,7 @@ func addUser(w http.ResponseWriter, r *http.Request) {
|
||||
user, err = dataprovider.UserExists(dataProvider, user.Username)
|
||||
if err == nil {
|
||||
user.Password = ""
|
||||
user.PublicKey = []string{}
|
||||
user.PublicKeys = []string{}
|
||||
render.JSON(w, r, user)
|
||||
} else {
|
||||
sendAPIResponse(w, r, err, "", http.StatusInternalServerError)
|
||||
|
||||
Reference in New Issue
Block a user