mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-07-16 17:47:22 +00:00
27 lines
886 B
C#
27 lines
886 B
C#
using Features.Emails.Services;
|
|
using MediatR;
|
|
using Shared.Application.Emails;
|
|
|
|
namespace Features.Emails.Commands.SendResendConfirmationEmail;
|
|
|
|
/// <summary>
|
|
/// Handles <see cref="SendResendConfirmationEmailCommand" />, the cross-slice command sent by Features.Auth
|
|
/// when a user requests a fresh confirmation link.
|
|
/// </summary>
|
|
/// <param name="emailDispatcher">Dispatcher used to render and send the email.</param>
|
|
public class SendResendConfirmationEmailHandler(IEmailDispatcher emailDispatcher)
|
|
: IRequestHandler<SendResendConfirmationEmailCommand>
|
|
{
|
|
public Task Handle(
|
|
SendResendConfirmationEmailCommand request,
|
|
CancellationToken cancellationToken
|
|
)
|
|
{
|
|
return emailDispatcher.SendResendConfirmationEmailAsync(
|
|
request.FirstName,
|
|
request.Email,
|
|
request.ConfirmationToken
|
|
);
|
|
}
|
|
}
|