2023-02-18 08:52:17 +01:00
|
|
|
using Microsoft.Extensions.Options;
|
|
|
|
|
|
2023-02-19 00:43:43 +01:00
|
|
|
using PrivaPub.Models;
|
2023-02-18 08:52:17 +01:00
|
|
|
|
2023-02-19 00:43:43 +01:00
|
|
|
namespace PrivaPub.Services
|
2023-02-18 08:52:17 +01:00
|
|
|
{
|
2026-10-17 03:13:16 +02:00
|
|
|
// The configuration as appsettings has it now. Builds before 2026-10-17 copied it into Mongo on first boot and read that
|
|
|
|
|
// copy forever after, so a changed SMTP account or language list never took; the copy is no longer read.
|
2026-11-10 01:24:43 +01:00
|
|
|
public class AppConfigurationService(
|
|
|
|
|
IOptionsMonitor<AppConfiguration> appConfiguration)
|
2023-02-18 08:52:17 +01:00
|
|
|
{
|
2026-11-10 01:24:43 +01:00
|
|
|
public AppConfiguration AppConfiguration => appConfiguration.CurrentValue;
|
2026-10-17 03:13:16 +02:00
|
|
|
|
2026-11-10 01:24:43 +01:00
|
|
|
public Task Init(CancellationToken token = default) => Task.CompletedTask;
|
2023-02-18 08:52:17 +01:00
|
|
|
}
|
|
|
|
|
}
|