Refactor email template command and controller

Updated namespace for `ResetEnvelopeTemplateCommand` and added default values for constructor parameters. Enhanced `EmailTemplateController` by making the `Update` method asynchronous, adding error handling, and incorporating a `try-catch` block for improved responsiveness and error management.
This commit is contained in:
Developer 02
2025-05-07 00:35:43 +02:00
parent 1c4f7f2386
commit e4eb3e1192
2 changed files with 22 additions and 12 deletions

View File

@@ -20,4 +20,4 @@ namespace EnvelopeGenerator.Application.EmailTemplates.Commands.Reset;
/// 8 - DocumentRejected_REC (Für den ablehnenden Empfänger): Mail an den ablehnenden Empfänger, wenn das Dokument abgelehnt wird.
/// 9 - DocumentRejected_REC_2 (Für sonstige Empfänger): Mail an andere Empfänger (Brief), wenn das Dokument abgelehnt wird.
/// </param>
public record ResetEnvelopeTemplateCommand(int? Id, Constants.EmailTemplateType? Type) : EmailTemplateQuery(Id, Type), IRequest;
public record ResetEnvelopeTemplateCommand(int? Id = null, Constants.EmailTemplateType? Type = null) : EmailTemplateQuery(Id, Type), IRequest;