mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: Add user service method ChangePassword (#53303)
* Chore: Add user service method ChangePassword * Fix lint
This commit is contained in:
@@ -52,12 +52,12 @@ func resetPasswordCommand(c utils.CommandLine, runner runner.Runner) error {
|
||||
return err
|
||||
}
|
||||
|
||||
cmd := models.ChangeUserPasswordCommand{
|
||||
UserId: AdminUserId,
|
||||
cmd := user.ChangeUserPasswordCommand{
|
||||
UserID: AdminUserId,
|
||||
NewPassword: passwordHashed,
|
||||
}
|
||||
|
||||
if err := runner.SQLStore.ChangeUserPassword(context.Background(), &cmd); err != nil {
|
||||
if err := runner.UserService.ChangePassword(context.Background(), &cmd); err != nil {
|
||||
return fmt.Errorf("failed to update user password: %w", err)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user