fix bug with password change
This commit is contained in:
parent
f914c62d5d
commit
63106edd97
@ -127,7 +127,7 @@ func UpdateUser(writer http.ResponseWriter, request *http.Request, params httpro
|
||||
if user.NewPassword != "" {
|
||||
var tmpUser models.User
|
||||
|
||||
result := gdb.Find(&tmpUser).Where(&models.User{Username: username})
|
||||
result := gdb.Where(&models.User{Username: username}).Find(&tmpUser)
|
||||
if result.Error != nil {
|
||||
utils.JSONErrorOutput(writer, http.StatusBadRequest, result.Error.Error())
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user