Refactor email template commands and controller logic

- Updated namespace for `ResetEmailTemplateCommand` and added a constructor for flexible initialization.
- Introduced `ChangedWhen` property in `UpdateEmailTemplateCommand` to track modification time.
- Refactored `UpdateEmailTemplateCommandHandler` for improved email template retrieval logic.
- Modified `EmailTemplateController` method signatures and logic for clarity and consistency.
- Added `EmailTemplate` entry in `appsettings.json` for database trigger configuration.
This commit is contained in:
Developer 02
2025-05-08 17:47:18 +02:00
parent 83fa5a29e8
commit 8b4ad5e28d
6 changed files with 61 additions and 18 deletions

View File

@@ -20,4 +20,10 @@ public record UpdateEmailTemplateCommand(string? Body = null, string? Subject =
/// </param>
[JsonIgnore]
public EmailTemplateQuery? EmailTemplateQuery { get; set; }
/// <summary>
///
/// </summary>
[JsonIgnore]
public DateTime ChangedWhen { get; init; } = DateTime.Now;
}