service id usage refactor
This commit is contained in:
parent
7cef9cbe8d
commit
e6da13e657
5 changed files with 19 additions and 21 deletions
|
|
@ -56,14 +56,16 @@ func New(ctx context.Context, cfg config.Config) *App {
|
|||
newApp.dbPool = dbPool
|
||||
|
||||
sessionCheckProvider := authCheck.New(authCheck.Deps{
|
||||
Addr: net.JoinHostPort(cfg.Auth.Host, cfg.Auth.Port),
|
||||
Timeout: cfg.Auth.Timeout,
|
||||
Addr: net.JoinHostPort(cfg.Auth.Host, cfg.Auth.Port),
|
||||
Timeout: cfg.Auth.Timeout,
|
||||
ServiceId: serviceId,
|
||||
})
|
||||
|
||||
//providers with deps
|
||||
userProv := user.New(user.Deps{
|
||||
DB: dbPool,
|
||||
Utils: u,
|
||||
DB: dbPool,
|
||||
Utils: u,
|
||||
AuthDP: sessionCheckProvider,
|
||||
})
|
||||
newApp.modules = append(newApp.modules, userProv)
|
||||
|
||||
|
|
@ -74,7 +76,6 @@ func New(ctx context.Context, cfg config.Config) *App {
|
|||
GinMode: cfg.Http.GinMode,
|
||||
UserProvider: userProv,
|
||||
AuthProvider: sessionCheckProvider,
|
||||
ServiceId: serviceId,
|
||||
})
|
||||
|
||||
m := merch.New(merch.Deps{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue