Chore: Delete org model duplicates (#60940)

* Delete org model duplicates

* Fix lint

* Move OrgDetailsDTO to org pkg
This commit is contained in:
idafurjes
2023-01-04 16:20:26 +01:00
committed by GitHub
parent 39b8d3a182
commit bb35f37b66
22 changed files with 83 additions and 162 deletions
+2 -1
View File
@@ -15,6 +15,7 @@ import (
"github.com/grafana/grafana/pkg/models"
"github.com/grafana/grafana/pkg/services/accesscontrol"
"github.com/grafana/grafana/pkg/services/auth"
"github.com/grafana/grafana/pkg/services/org"
"github.com/grafana/grafana/pkg/services/user"
"github.com/grafana/grafana/pkg/util"
"github.com/grafana/grafana/pkg/web"
@@ -67,7 +68,7 @@ func (hs *HTTPServer) AdminCreateUser(c *models.ReqContext) response.Response {
usr, err := hs.userService.Create(c.Req.Context(), &cmd)
if err != nil {
if errors.Is(err, models.ErrOrgNotFound) {
if errors.Is(err, org.ErrOrgNotFound) {
return response.Error(400, err.Error(), nil)
}