diff options
Diffstat (limited to 'backend/main.go')
| -rw-r--r-- | backend/main.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/backend/main.go b/backend/main.go index 939df03..7330109 100644 --- a/backend/main.go +++ b/backend/main.go @@ -11,6 +11,7 @@ import ( "github.com/labstack/echo/v4/middleware" oapimiddleware "github.com/oapi-codegen/echo-middleware" + "github.com/nsfisis/iosdc-japan-2024-albatross/backend/admin" "github.com/nsfisis/iosdc-japan-2024-albatross/backend/api" "github.com/nsfisis/iosdc-japan-2024-albatross/backend/db" "github.com/nsfisis/iosdc-japan-2024-albatross/backend/game" @@ -53,6 +54,7 @@ func main() { queries := db.New(connPool) e := echo.New() + e.Renderer = admin.NewRenderer() e.Use(middleware.Logger()) e.Use(middleware.Recover()) @@ -77,6 +79,10 @@ func main() { apiHandler := api.NewHandler(queries, gameHubs) api.RegisterHandlers(apiGroup, api.NewStrictHandler(apiHandler, nil)) + adminHandler := admin.NewAdminHandler(queries, gameHubs) + adminGroup := e.Group("/admin") + adminHandler.RegisterHandlers(adminGroup) + gameHubs.Run() if err := e.Start(":80"); err != http.ErrServerClosed { |
