summaryrefslogtreecommitdiff
path: root/internal/handlers/main.go
diff options
context:
space:
mode:
authorGrailFinder <wohilas@gmail.com>2024-06-12 09:13:05 +0300
committerGrailFinder <wohilas@gmail.com>2024-06-12 09:13:05 +0300
commitb300ad869f424cdd26bcfc78635a27656836ca96 (patch)
treefc675c3608269d367be2ec23fd689f030bfaebd2 /internal/handlers/main.go
parent01f9a9f5d71450a0c80195058245fdebe88796bd (diff)
Feat: add cron and defaults tableHEADmaster
Diffstat (limited to 'internal/handlers/main.go')
-rw-r--r--internal/handlers/main.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/internal/handlers/main.go b/internal/handlers/main.go
index 3bb194c..5546d9a 100644
--- a/internal/handlers/main.go
+++ b/internal/handlers/main.go
@@ -11,8 +11,6 @@ import (
"os"
"strconv"
"time"
-
- "github.com/jmoiron/sqlx"
)
var defUS = models.UserScore{}
@@ -27,7 +25,7 @@ type Handlers struct {
// NewHandlers constructor
func NewHandlers(
- cfg config.Config, l *slog.Logger, conn *sqlx.DB,
+ cfg config.Config, l *slog.Logger, repo repos.FullRepo,
) *Handlers {
if l == nil {
l = slog.New(slog.NewJSONHandler(os.Stdout, nil))
@@ -35,7 +33,7 @@ func NewHandlers(
h := &Handlers{
cfg: cfg,
log: l,
- repo: repos.NewProvider(conn),
+ repo: repo,
mc: cache.MemCache,
}
return h