summaryrefslogtreecommitdiff
path: root/internal/server/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/server/main.go')
-rw-r--r--internal/server/main.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/internal/server/main.go b/internal/server/main.go
index 45f3d41..95d0369 100644
--- a/internal/server/main.go
+++ b/internal/server/main.go
@@ -9,6 +9,8 @@ import (
"os"
"os/signal"
"syscall"
+
+ "github.com/jmoiron/sqlx"
)
// Server interface
@@ -39,11 +41,9 @@ func (srv *server) stopOnSignal(close context.CancelFunc) {
os.Exit(0)
}
-func NewServer(cfg config.Config, log *slog.Logger) Server {
+func NewServer(cfg config.Config, log *slog.Logger, conn *sqlx.DB) Server {
ctx, close := context.WithCancel(context.Background())
- // s := service.NewService(ctx, cfg, store.MemCache)
- actions := handlers.NewHandlers(cfg, log)
-
+ actions := handlers.NewHandlers(cfg, log, conn)
return &server{
config: cfg,
actions: actions,