Login: Remove CreateUser from LoginService (#59464)

* LoginService: remove create user and use user.Service instead

* Fix tests
This commit is contained in:
Karl Persson
2022-11-29 10:20:44 +01:00
committed by GitHub
parent 454c8841a4
commit a4a5307722
8 changed files with 22 additions and 65 deletions
+1 -1
View File
@@ -65,7 +65,7 @@ func (hs *HTTPServer) AdminCreateUser(c *models.ReqContext) response.Response {
return response.Error(400, "Password is missing or too short", nil)
}
usr, err := hs.Login.CreateUser(cmd)
usr, err := hs.userService.Create(c.Req.Context(), &cmd)
if err != nil {
if errors.Is(err, models.ErrOrgNotFound) {
return response.Error(400, err.Error(), nil)