Refactor email template command and handler

Introduced `ResetEmailTemplateCommand` and `ResetEmailTemplateCommandHandler`, replacing the previous `ResetEnvelopeTemplateCommand` and its handler. Updated the controller to utilize the new command, ensuring consistent mapping and command sending.
This commit is contained in:
Developer 02
2025-05-07 16:07:43 +02:00
parent 519df50404
commit b15616cf53
3 changed files with 7 additions and 7 deletions

View File

@@ -111,13 +111,13 @@ public class EmailTemplateController : ControllerBase
{
if (update is null)
{
var reset = _mapper.Map<ResetEnvelopeTemplateCommand>(email);
await _mediator.Send(new ResetEnvelopeTemplateCommand(email?.Id, email?.Type));
var reset = _mapper.Map<ResetEmailTemplateCommand>(email);
await _mediator.Send(new ResetEmailTemplateCommand(email?.Id, email?.Type));
return Ok();
}
else
{
var reset = _mapper.Map<ResetEnvelopeTemplateCommand>(email);
var reset = _mapper.Map<ResetEmailTemplateCommand>(email);
await _mediator.Send(update);
return Ok();
}