fix bug with password change

This commit is contained in:
Chris Cromer 2023-02-10 22:37:00 -03:00
parent f914c62d5d
commit 63106edd97
Signed by: cromer
GPG Key ID: FA91071797BEEEC2
1 changed files with 1 additions and 1 deletions

View File

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