fix: add Admin model to configuration

This commit is contained in:
Polianin Nikita 2024-06-28 22:52:58 +03:00
parent f89136669d
commit 2c112d00df

View File

@ -6,6 +6,7 @@ using Mirea.Api.DataAccess.Application;
using Mirea.Api.DataAccess.Persistence;
using Mirea.Api.DataAccess.Persistence.Common;
using Mirea.Api.Endpoint.Common.Interfaces;
using Mirea.Api.Endpoint.Common.Model;
using Mirea.Api.Endpoint.Common.Services;
using Mirea.Api.Endpoint.Configuration.AppConfig;
using Mirea.Api.Endpoint.Configuration.General;
@ -37,6 +38,8 @@ public class Program
builder.Configuration.AddConfiguration(EnvironmentConfiguration.GetEnvironment());
builder.Configuration.AddJsonFile(PathBuilder.Combine(GeneralConfig.FilePath), optional: true, reloadOnChange: true);
builder.Services.Configure<GeneralConfig>(builder.Configuration);
builder.Configuration.AddJsonFile(PathBuilder.Combine(Admin.PathToSave), optional: true, reloadOnChange: true);
builder.Services.Configure<Admin>(builder.Configuration);
builder.Host.AddCustomSerilog();
AddDatabase(builder.Services, builder.Configuration);