pkg/util: Check errors (#19832)
* pkg/util: Check errors * pkg/services: DRY up code
This commit is contained in:
1 parent
31a346fcf2
commit
35e0e078b7
30 files changed
+247
-84
No files matched your search
@@ -61,7 +61,11 @@ func AdminUpdateUserPassword(c *models.ReqContext, form dtos.AdminUpdateUserPass
|
||||
return
|
||||
}
|
||||
|
||||
passwordHashed := util.EncodePassword(form.Password, userQuery.Result.Salt)
|
||||
passwordHashed, err := util.EncodePassword(form.Password, userQuery.Result.Salt)
|
||||
if err != nil {
|
||||
c.JsonApiErr(500, "Could not encode password", err)
|
||||
return
|
||||
}
|
||||
|
||||
cmd := models.ChangeUserPasswordCommand{
|
||||
UserId: userID,
|
||||
|
||||
Reference in new issue
Block a user