fix bug with password change
This commit is contained in:
parent
bff04407e0
commit
c040b8a75c
@ -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