fix: error CS0103
Some checks failed
Test with Different Databases / test (mysql) (pull_request) Failing after 3s
Test with Different Databases / test (postgresql) (pull_request) Failing after 2s
Test with Different Databases / test (sqlite) (pull_request) Failing after 1s
.NET Test Pipeline / build-and-test (pull_request) Failing after 12m0s

This commit is contained in:
Polianin Nikita 2024-05-30 23:30:11 +03:00
parent c9c6a99fe9
commit f0544ff42e

View File

@ -15,6 +15,7 @@ using Mirea.Api.Endpoint.Common.Services;
using Mirea.Api.Endpoint.Common.Services.Security; using Mirea.Api.Endpoint.Common.Services.Security;
using Mirea.Api.Endpoint.Configuration; using Mirea.Api.Endpoint.Configuration;
using Mirea.Api.Endpoint.Configuration.General; 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.General.Validators;
using Mirea.Api.Endpoint.Configuration.Swagger; using Mirea.Api.Endpoint.Configuration.Swagger;
using Mirea.Api.Endpoint.Middleware; using Mirea.Api.Endpoint.Middleware;
@ -114,6 +115,7 @@ public class Program
builder.Configuration.AddJsonFile(PathBuilder.Combine(GeneralConfig.FilePath), optional: true, reloadOnChange: true); builder.Configuration.AddJsonFile(PathBuilder.Combine(GeneralConfig.FilePath), optional: true, reloadOnChange: true);
builder.Services.Configure<GeneralConfig>(builder.Configuration); builder.Services.Configure<GeneralConfig>(builder.Configuration);
var generalConfig = builder.Configuration.Get<GeneralConfig>();
builder.Services.AddApplication(); builder.Services.AddApplication();
builder.Services.AddPersistence(generalConfig?.DbSettings?.DatabaseProvider ?? DatabaseProvider.Sqlite, generalConfig?.DbSettings?.ConnectionStringSql ?? string.Empty); builder.Services.AddPersistence(generalConfig?.DbSettings?.DatabaseProvider ?? DatabaseProvider.Sqlite, generalConfig?.DbSettings?.ConnectionStringSql ?? string.Empty);
builder.Services.AddControllers(); builder.Services.AddControllers();