using CMSMicroservice.Domain.Events;
using Microsoft.Extensions.Logging;

namespace CMSMicroservice.Application.OtpTokenCQ.EventHandlers;

public class VerifyOtpTokenEventHandler : INotificationHandler<VerifyOtpTokenEvent>
{
    private readonly ILogger<VerifyOtpTokenEventHandler> _logger;

    public VerifyOtpTokenEventHandler(ILogger<VerifyOtpTokenEventHandler> logger)
    {
        _logger = logger;
    }

    public Task Handle(VerifyOtpTokenEvent notification, CancellationToken cancellationToken)
    {
        _logger.LogInformation("Domain Event: {DomainEvent}", notification.GetType().Name);

        return Task.CompletedTask;
    }
}
