diff --git a/HrynCo.NotificationService.DAL.Abstract/Providers/EmailChannelSettings.cs b/HrynCo.NotificationService.DAL.Abstract/Providers/EmailChannelSettings.cs index 4cca19b..24cf23c 100644 --- a/HrynCo.NotificationService.DAL.Abstract/Providers/EmailChannelSettings.cs +++ b/HrynCo.NotificationService.DAL.Abstract/Providers/EmailChannelSettings.cs @@ -9,13 +9,11 @@ public class SmtpChannelSettings : EmailChannelSettings { public override EmailChannelType EmailChannelType => EmailChannelType.Smtp; - public required string Host { get; set; } + public string Host { get; set; } = string.Empty; public int Port { get; set; } = 587; - public required string Username { get; set; } - public required string Password { get; set; } + public string Username { get; set; } = string.Empty; + public string Password { get; set; } = string.Empty; public bool UseSsl { get; set; } = true; - public required string FromEmail { get; set; } - public required string FromName { get; set; } - public required string AppDisplayName { get; set; } - public required string AppBaseUrl { get; set; } + public string FromEmail { get; set; } = string.Empty; + public string FromName { get; set; } = string.Empty; } diff --git a/HrynCo.NotificationService.Web/Controllers/Admin/AdminChannelsController.cs b/HrynCo.NotificationService.Web/Controllers/Admin/AdminChannelsController.cs index f833b03..4aa3718 100644 --- a/HrynCo.NotificationService.Web/Controllers/Admin/AdminChannelsController.cs +++ b/HrynCo.NotificationService.Web/Controllers/Admin/AdminChannelsController.cs @@ -55,8 +55,7 @@ public class AdminChannelsController : Controller var channel = result.Result; var smtp = channel.Settings as SmtpChannelSettings ?? new SmtpChannelSettings { - Host = "", Username = "", Password = "", - FromEmail = "", FromName = "", AppDisplayName = "", AppBaseUrl = "" + Host = "", Username = "", Password = "", FromEmail = "", FromName = "" }; var vm = new EmailChannelEditViewModel @@ -75,9 +74,7 @@ public class AdminChannelsController : Controller Password = smtp.Password, UseSsl = smtp.UseSsl, FromEmail = smtp.FromEmail, - FromName = smtp.FromName, - AppDisplayName = smtp.AppDisplayName, - AppBaseUrl = smtp.AppBaseUrl + FromName = smtp.FromName }; return View(vm); @@ -99,9 +96,7 @@ public class AdminChannelsController : Controller Password = model.Password, UseSsl = model.UseSsl, FromEmail = model.FromEmail, - FromName = model.FromName, - AppDisplayName = model.AppDisplayName, - AppBaseUrl = model.AppBaseUrl + FromName = model.FromName }; if (model.IsNew) diff --git a/HrynCo.NotificationService.Web/Controllers/Admin/ViewModels/EmailChannelEditViewModel.cs b/HrynCo.NotificationService.Web/Controllers/Admin/ViewModels/EmailChannelEditViewModel.cs index 1810baa..9bf9731 100644 --- a/HrynCo.NotificationService.Web/Controllers/Admin/ViewModels/EmailChannelEditViewModel.cs +++ b/HrynCo.NotificationService.Web/Controllers/Admin/ViewModels/EmailChannelEditViewModel.cs @@ -45,12 +45,6 @@ public class EmailChannelEditViewModel [Required] public string FromName { get; set; } = ""; - [Required] - public string AppDisplayName { get; set; } = ""; - - [Required] - public string AppBaseUrl { get; set; } = ""; - // ── Computed ─────────────────────────────────────────────────────── public bool IsNew => Id == Guid.Empty; public string PageTitle => IsNew ? "Create Channel" : "Edit Channel"; diff --git a/HrynCo.NotificationService.Web/Views/AdminChannels/Edit.cshtml b/HrynCo.NotificationService.Web/Views/AdminChannels/Edit.cshtml index 82dae81..7beb11c 100644 --- a/HrynCo.NotificationService.Web/Views/AdminChannels/Edit.cshtml +++ b/HrynCo.NotificationService.Web/Views/AdminChannels/Edit.cshtml @@ -117,19 +117,6 @@ -
-
- - - -
-
- - - -
-
- @section FormActions {