mirror of
https://github.com/grafana/grafana.git
synced 2026-08-13 14:45:02 -05:00
pkg/util: Check errors (#19832)
* pkg/util: Check errors * pkg/services: DRY up code
This commit is contained in:
@@ -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