service id usage refactor

This commit is contained in:
nquidox 2026-04-01 17:48:12 +03:00
parent 7cef9cbe8d
commit e6da13e657
5 changed files with 19 additions and 21 deletions

View file

@ -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{