This commit is contained in:
nquidox 2026-03-01 22:13:39 +03:00
parent b89fb42679
commit 669bfbf5a0
6 changed files with 232 additions and 12 deletions

View file

@ -8,6 +8,7 @@ import (
"merch-api/internal/merch"
"merch-api/pkg/dbase"
"merch-api/pkg/router"
"merch-api/pkg/utils"
"time"
)
@ -36,6 +37,8 @@ func New(cfg config.Config) *App {
DBName: cfg.DBase.DBName,
})
u := utils.New()
if err != nil {
log.WithError(err).Fatalf("%v failed to connect database", pkgLogHeader)
}
@ -43,7 +46,10 @@ func New(cfg config.Config) *App {
//modules
var modules []Module
m := merch.New(db)
m := merch.New(merch.Deps{
DB: db,
Utils: u,
})
modules = append(modules, m)
return &App{