aboutsummaryrefslogtreecommitdiffhomepage
path: root/backend/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'backend/main.go')
-rw-r--r--backend/main.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/backend/main.go b/backend/main.go
index 2825b84..7220ca6 100644
--- a/backend/main.go
+++ b/backend/main.go
@@ -24,6 +24,7 @@ import (
"albatross-2026-backend/game"
"albatross-2026-backend/ratelimit"
"albatross-2026-backend/taskqueue"
+ "albatross-2026-backend/tournament"
)
func connectDB(ctx context.Context, dsn string) (*pgxpool.Pool, error) {
@@ -105,7 +106,9 @@ func main() {
apiGroup.Use(ratelimit.LoginRateLimitMiddleware(loginRL))
apiGroup.Use(api.SessionCookieMiddleware(queries))
apiGroup.Use(oapimiddleware.OapiRequestValidator(openAPISpec))
- apiHandler := api.NewHandler(queries, txm, gameHub, authenticator, conf)
+ gameSvc := game.NewService(queries, txm, gameHub)
+ tournamentSvc := tournament.NewService(queries)
+ apiHandler := api.NewHandler(gameSvc, tournamentSvc, authenticator, queries, conf)
api.RegisterHandlers(apiGroup, api.NewStrictHandler(apiHandler, nil))
adminHandler := admin.NewHandler(queries, txm, gameHub, conf)