pkg/util: Check errors (#19832)

* pkg/util: Check errors
* pkg/services: DRY up code
This commit is contained in:
Arve Knudsen authored and GitHub committed 2019-10-23 10:40:12 +02:00
1 parent 31a346fcf2
commit 35e0e078b7
30 files changed
+247 -84

No files matched your search

+5 -1
View File
@@ -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,