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:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user