From 63106edd978d18c37e497d5daf4894395889756f Mon Sep 17 00:00:00 2001 From: Chris Cromer Date: Fri, 10 Feb 2023 22:37:00 -0300 Subject: [PATCH] fix bug with password change --- backend/controllers/user.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/controllers/user.go b/backend/controllers/user.go index 270f9ee..eeebc25 100644 --- a/backend/controllers/user.go +++ b/backend/controllers/user.go @@ -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