From 7df60840ce2ef27d1af80d9e7c66d26fca90b7f4 Mon Sep 17 00:00:00 2001 From: Stavros Date: Sun, 14 Dec 2025 19:34:45 +0200 Subject: [PATCH] fix: assign configured providers to app context --- internal/bootstrap/app_bootstrap.go | 8 +++++--- .../bootstrap/{router_boostrap.go => router_bootstrap.go} | 0 2 files changed, 5 insertions(+), 3 deletions(-) rename internal/bootstrap/{router_boostrap.go => router_bootstrap.go} (100%) diff --git a/internal/bootstrap/app_bootstrap.go b/internal/bootstrap/app_bootstrap.go index d470a9d..1862b72 100644 --- a/internal/bootstrap/app_bootstrap.go +++ b/internal/bootstrap/app_bootstrap.go @@ -124,8 +124,10 @@ func (app *BootstrapApp) Setup() error { return fmt.Errorf("no authentication providers configured") } + app.context.configuredProviders = configuredProviders + // Setup router - engine, err := app.setupRouter() + router, err := app.setupRouter() if err != nil { return fmt.Errorf("failed to setup routes: %w", err) @@ -152,7 +154,7 @@ func (app *BootstrapApp) Setup() error { } log.Info().Msgf("Starting server on unix socket %s", app.config.SocketPath) - if err := engine.RunUnix(app.config.SocketPath); err != nil { + if err := router.RunUnix(app.config.SocketPath); err != nil { log.Fatal().Err(err).Msg("Failed to start server") } @@ -162,7 +164,7 @@ func (app *BootstrapApp) Setup() error { // Start server address := fmt.Sprintf("%s:%d", app.config.Address, app.config.Port) log.Info().Msgf("Starting server on %s", address) - if err := engine.Run(address); err != nil { + if err := router.Run(address); err != nil { log.Fatal().Err(err).Msg("Failed to start server") } diff --git a/internal/bootstrap/router_boostrap.go b/internal/bootstrap/router_bootstrap.go similarity index 100% rename from internal/bootstrap/router_boostrap.go rename to internal/bootstrap/router_bootstrap.go