This commit is contained in:
parent
c7c67a641e
commit
081267a662
3 changed files with 57 additions and 8 deletions
|
|
@ -2,6 +2,7 @@ package user
|
|||
|
||||
import (
|
||||
"github.com/jackc/pgx/v5/pgxpool"
|
||||
"merch-api/internal/common"
|
||||
"merch-api/pkg/utils"
|
||||
)
|
||||
|
||||
|
|
@ -13,13 +14,14 @@ type Handler struct {
|
|||
}
|
||||
|
||||
type Deps struct {
|
||||
DB *pgxpool.Pool
|
||||
Utils utils.Utils
|
||||
DB *pgxpool.Pool
|
||||
Utils utils.Utils
|
||||
AuthDP common.AuthDataProvider
|
||||
}
|
||||
|
||||
func New(deps Deps) *Handler {
|
||||
r := newRepository(deps.DB)
|
||||
s := newService(r, deps.Utils)
|
||||
s := newService(r, deps.Utils, deps.AuthDP)
|
||||
c := newController(s, deps.Utils)
|
||||
|
||||
return &Handler{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue