diff --git a/handler/http.go b/handler/http.go index b9cbacf..dbee15e 100644 --- a/handler/http.go +++ b/handler/http.go @@ -2,9 +2,9 @@ package handler import ( "embed" - "github.com/labstack/echo/v4" - "github.com/leagueify/account/internal/config" "net/http" + + "github.com/labstack/echo/v4" ) var ( @@ -15,7 +15,6 @@ var ( type httpHandler struct { app *echo.Echo - cfg *config.Config } func (h *httpHandler) Initialize() { @@ -23,10 +22,9 @@ func (h *httpHandler) Initialize() { group.StaticFS("/docs", docFS) group.GET("/healthz", healthz) } -func HTTP(app *echo.Echo, cfg *config.Config) Handler { +func HTTP(app *echo.Echo) Handler { return &httpHandler{ app: app, - cfg: cfg, } } func healthz(ctx echo.Context) error { diff --git a/internal/integrations/server/echo.go b/internal/integrations/server/echo.go index 464a2c6..6ef9d64 100644 --- a/internal/integrations/server/echo.go +++ b/internal/integrations/server/echo.go @@ -47,7 +47,7 @@ func (s *echoServer) Start() { )) s.app.Use(middleware.Recover()) // register http handler - handler.HTTP(s.app, s.cfg).Initialize() + handler.HTTP(s.app).Initialize() showStartBanner() // start server s.app.Logger.Fatal(s.app.Start(fmt.Sprintf(":%d", s.cfg.Server.Port)))