move UserToken and UserTokenService to models package

This commit is contained in:
Marcus Efraimsson
2019-02-06 16:45:48 +01:00
parent a60124a88c
commit 8678620730
12 changed files with 85 additions and 86 deletions
+2 -3
View File
@@ -5,7 +5,6 @@ import (
"github.com/grafana/grafana/pkg/bus"
m "github.com/grafana/grafana/pkg/models"
"github.com/grafana/grafana/pkg/services/auth"
"github.com/grafana/grafana/pkg/services/session"
"github.com/grafana/grafana/pkg/setting"
. "github.com/smartystreets/goconvey/convey"
@@ -81,8 +80,8 @@ func TestMiddlewareQuota(t *testing.T) {
return nil
})
sc.userAuthTokenService.lookupTokenProvider = func(unhashedToken string) (*auth.UserToken, error) {
return &auth.UserToken{
sc.userAuthTokenService.lookupTokenProvider = func(unhashedToken string) (*m.UserToken, error) {
return &m.UserToken{
UserId: 12,
UnhashedToken: "",
}, nil