diff --git a/Endpoint/Program.cs b/Endpoint/Program.cs index 3c39eed..adef11a 100644 --- a/Endpoint/Program.cs +++ b/Endpoint/Program.cs @@ -15,6 +15,7 @@ using Mirea.Api.Endpoint.Common.Services; using Mirea.Api.Endpoint.Common.Services.Security; using Mirea.Api.Endpoint.Configuration; using Mirea.Api.Endpoint.Configuration.General; +using Mirea.Api.Endpoint.Configuration.General.Settings; using Mirea.Api.Endpoint.Configuration.General.Validators; using Mirea.Api.Endpoint.Configuration.Swagger; using Mirea.Api.Endpoint.Middleware; @@ -114,6 +115,7 @@ public class Program builder.Configuration.AddJsonFile(PathBuilder.Combine(GeneralConfig.FilePath), optional: true, reloadOnChange: true); builder.Services.Configure(builder.Configuration); + var generalConfig = builder.Configuration.Get(); builder.Services.AddApplication(); builder.Services.AddPersistence(generalConfig?.DbSettings?.DatabaseProvider ?? DatabaseProvider.Sqlite, generalConfig?.DbSettings?.ConnectionStringSql ?? string.Empty); builder.Services.AddControllers();