Bulk: Commit: AdminSettings Module
Saving to DB is done, Reading from DB to UI is done. Loading at startup is still missing...
This commit is contained in:
@@ -1,10 +1,14 @@
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Options;
|
||||
using Oqtane.Infrastructure;
|
||||
using System;
|
||||
using SZUAbsolventenverein.Module.AdminModules.Models;
|
||||
using SZUAbsolventenverein.Module.AdminModules.Repository;
|
||||
using SZUAbsolventenverein.Module.AdminModules.Server.Startup;
|
||||
using SZUAbsolventenverein.Module.AdminModules.Services;
|
||||
using SZUAbsolventenverein.Module.AdminSettings.Services;
|
||||
|
||||
@@ -24,14 +28,16 @@ namespace SZUAbsolventenverein.Module.AdminModules.Startup
|
||||
|
||||
public void ConfigureServices(IServiceCollection services)
|
||||
{
|
||||
services.Configure<DataProtectionTokenProviderOptions>(options =>
|
||||
{
|
||||
options.TokenLifespan = TimeSpan.FromDays(14);
|
||||
});
|
||||
|
||||
services.AddTransient<IAdminModulesService, ServerAdminModulesService>();
|
||||
services.AddTransient<IAdminSettingsService, ServerAdminSettingsService>();
|
||||
services.AddDbContextFactory<AdminModulesContext>(opt => { }, ServiceLifetime.Transient);
|
||||
|
||||
services.Configure<DataProtectionTokenProviderOptions>(options =>
|
||||
{
|
||||
options.TokenLifespan = TimeSpan.FromHours(2);
|
||||
});
|
||||
|
||||
services.AddTransient<IConfigureOptions<DataProtectionTokenProviderOptions>, DataProtectionTokenOptionsConfigurator>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user