fix bug with password change

This commit is contained in:
Chris Cromer 2023-02-10 22:37:00 -03:00 committed by Martin Araneda
parent bff04407e0
commit c040b8a75c

View File

@ -127,7 +127,7 @@ func UpdateUser(writer http.ResponseWriter, request *http.Request, params httpro
if user.NewPassword != "" { if user.NewPassword != "" {
var tmpUser models.User 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 { if result.Error != nil {
utils.JSONErrorOutput(writer, http.StatusBadRequest, result.Error.Error()) utils.JSONErrorOutput(writer, http.StatusBadRequest, result.Error.Error())
return return