diff --git a/api/admin/accounts.go b/api/admin/accounts.go index 5cb9d81..b0e8cf0 100644 --- a/api/admin/accounts.go +++ b/api/admin/accounts.go @@ -18,12 +18,6 @@ var ( ErrAccountValidation = errors.New("account validation error") ) -type ctxKey int - -const ( - ctxAccount ctxKey = iota -) - // AccountStore defines database operations for account management. type AccountStore interface { List(f auth.AccountFilter) (*[]auth.Account, int, error) diff --git a/api/admin/api.go b/api/admin/api.go index d2dbf5d..3babffa 100644 --- a/api/admin/api.go +++ b/api/admin/api.go @@ -17,6 +17,12 @@ const ( roleAdmin = "admin" ) +type ctxKey int + +const ( + ctxAccount ctxKey = iota +) + // API provides admin application resources and handlers. type API struct { Accounts *AccountResource diff --git a/api/app/account.go b/api/app/account.go index cf78de1..f646e7e 100644 --- a/api/app/account.go +++ b/api/app/account.go @@ -15,12 +15,6 @@ import ( "github.com/dhax/go-base/models" ) -type ctxKey int - -const ( - ctxAccount ctxKey = iota -) - // AccountStore defines database operations for account. type AccountStore interface { Get(id int) (*auth.Account, error) diff --git a/api/app/api.go b/api/app/api.go index 93f0cb8..7bbf6bd 100644 --- a/api/app/api.go +++ b/api/app/api.go @@ -7,6 +7,12 @@ import ( "github.com/dhax/go-base/database" ) +type ctxKey int + +const ( + ctxAccount ctxKey = iota +) + // API provides application resources and handlers. type API struct { Account *AccountResource