Chore: Delete password and search from models package (#62482)

* Chore: Delete password and search from models package

* Rename model to AdminCreateUserResponse
This commit is contained in:
idafurjes
2023-01-31 11:04:55 +01:00
committed by GitHub
parent 60575041a5
commit cbc10f9c5d
9 changed files with 29 additions and 110 deletions
@@ -11,7 +11,6 @@ import (
"github.com/grafana/grafana/pkg/cmd/grafana-cli/logger"
"github.com/grafana/grafana/pkg/cmd/grafana-cli/runner"
"github.com/grafana/grafana/pkg/cmd/grafana-cli/utils"
"github.com/grafana/grafana/pkg/models"
"github.com/grafana/grafana/pkg/services/user"
"github.com/grafana/grafana/pkg/util"
)
@@ -46,7 +45,7 @@ func resetPasswordCommand(c utils.CommandLine, runner runner.Runner) error {
}
func resetPassword(adminId int64, newPassword string, userSvc user.Service) error {
password := models.Password(newPassword)
password := user.Password(newPassword)
if password.IsWeak() {
return fmt.Errorf("new password is too short")
}