diff --git a/EnvelopeGenerator.Application/Configurations/DispatcherConfig.cs b/EnvelopeGenerator.Application/Configurations/DispatcherConfig.cs deleted file mode 100644 index 7e261241..00000000 --- a/EnvelopeGenerator.Application/Configurations/DispatcherConfig.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace EnvelopeGenerator.Application.Configurations -{ - public class DispatcherConfig - { - public int SendingProfile { get; init; } = 1; - - public string AddedWho { get; init; } = "DDEnvelopGenerator"; - - public int ReminderTypeId { get; init; } = 202377; - - public string EmailAttmt1 { get; init; } = string.Empty; - } -} \ No newline at end of file diff --git a/EnvelopeGenerator.Application/Configurations/DispatcherParams.cs b/EnvelopeGenerator.Application/Configurations/DispatcherParams.cs new file mode 100644 index 00000000..ca152205 --- /dev/null +++ b/EnvelopeGenerator.Application/Configurations/DispatcherParams.cs @@ -0,0 +1,12 @@ +namespace EnvelopeGenerator.Application.Configurations; + +public class DispatcherParams +{ + public int SendingProfile { get; init; } = 1; + + public string AddedWho { get; init; } = "DDEnvelopGenerator"; + + public int ReminderTypeId { get; init; } = 202377; + + public string EmailAttmt1 { get; init; } = string.Empty; +} \ No newline at end of file diff --git a/EnvelopeGenerator.Application/Configurations/MailConfig.cs b/EnvelopeGenerator.Application/Configurations/MailConfig.cs deleted file mode 100644 index b3a4d695..00000000 --- a/EnvelopeGenerator.Application/Configurations/MailConfig.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace EnvelopeGenerator.Application.Configurations -{ - public class MailConfig - { - public required Dictionary Placeholders { get; init; } - } -} \ No newline at end of file diff --git a/EnvelopeGenerator.Application/Configurations/MailParams.cs b/EnvelopeGenerator.Application/Configurations/MailParams.cs new file mode 100644 index 00000000..f0a14796 --- /dev/null +++ b/EnvelopeGenerator.Application/Configurations/MailParams.cs @@ -0,0 +1,6 @@ +namespace EnvelopeGenerator.Application.Configurations; + +public class MailParams +{ + public required Dictionary Placeholders { get; init; } +} \ No newline at end of file diff --git a/EnvelopeGenerator.Application/Extensions/DIExtensions.cs b/EnvelopeGenerator.Application/Extensions/DIExtensions.cs index 4ece3817..3ad13d27 100644 --- a/EnvelopeGenerator.Application/Extensions/DIExtensions.cs +++ b/EnvelopeGenerator.Application/Extensions/DIExtensions.cs @@ -54,8 +54,8 @@ namespace EnvelopeGenerator.Application.Extensions services.AddAutoMapper(typeof(BasicDtoMappingProfile).Assembly); services.AddAutoMapper(typeof(UserMappingProfile).Assembly); - services.ConfigureByTypeName(config); - services.ConfigureByTypeName(config); + services.ConfigureByTypeName(config); + services.ConfigureByTypeName(config); services.ConfigureByTypeName(config); services.ConfigureByTypeName(config); diff --git a/EnvelopeGenerator.Application/Services/EnvelopeMailService.cs b/EnvelopeGenerator.Application/Services/EnvelopeMailService.cs index 99a77ca0..235383d6 100644 --- a/EnvelopeGenerator.Application/Services/EnvelopeMailService.cs +++ b/EnvelopeGenerator.Application/Services/EnvelopeMailService.cs @@ -21,12 +21,12 @@ namespace EnvelopeGenerator.Application.Services { private readonly IEmailTemplateService _tempService; private readonly IEnvelopeReceiverService _envRcvService; - private readonly DispatcherConfig _dConfig; + private readonly DispatcherParams _dConfig; private readonly IConfigService _configService; private readonly Dictionary _placeholders; private readonly ICodeGenerator _codeGenerator; - public EnvelopeMailService(IEmailOutRepository repository, IMapper mapper, IEmailTemplateService tempService, IEnvelopeReceiverService envelopeReceiverService, IOptions dispatcherConfigOptions, IConfigService configService, IOptions mailConfig, ICodeGenerator codeGenerator) : base(repository, mapper) + public EnvelopeMailService(IEmailOutRepository repository, IMapper mapper, IEmailTemplateService tempService, IEnvelopeReceiverService envelopeReceiverService, IOptions dispatcherConfigOptions, IConfigService configService, IOptions mailConfig, ICodeGenerator codeGenerator) : base(repository, mapper) { _tempService = tempService; _envRcvService = envelopeReceiverService; diff --git a/EnvelopeGenerator.Web/Program.cs b/EnvelopeGenerator.Web/Program.cs index 98dc62d3..fbf24996 100644 --- a/EnvelopeGenerator.Web/Program.cs +++ b/EnvelopeGenerator.Web/Program.cs @@ -16,7 +16,6 @@ using DigitalData.EmailProfilerDispatcher; using EnvelopeGenerator.Infrastructure; using EnvelopeGenerator.Web.Sanitizers; using EnvelopeGenerator.Application.Extensions; -using Microsoft.Extensions.DependencyInjection; var logger = LogManager.Setup().LoadConfigurationFromAppSettings().GetCurrentClassLogger(); logger.Info("Logging initialized!"); @@ -50,8 +49,6 @@ try // Add higher order services builder.Services.AddScoped(); - builder.Services.Configure(config.GetSection("TotpSmsParams")); - // Add controllers and razor views builder.Services.AddControllersWithViews(options => { diff --git a/EnvelopeGenerator.Web/appsettings.json b/EnvelopeGenerator.Web/appsettings.json index 05320652..8d71fd3c 100644 --- a/EnvelopeGenerator.Web/appsettings.json +++ b/EnvelopeGenerator.Web/appsettings.json @@ -108,13 +108,13 @@ "ShowPageClass": "dd-show-logo", "LockedPageClass": "dd-locked-logo" }, - "DispatcherConfig": { + "DispatcherParams": { "SendingProfile": 1, "AddedWho": "DDEnvelopGenerator", "ReminderTypeId": 202377, "EmailAttmt1": "" }, - "MailConfig": { + "MailParams": { "Placeholders": { "[NAME_PORTAL]": "signFlow", "[SIGNATURE_TYPE]": "signieren",