diff --git a/EnvelopeGenerator.Application/Common/Notifications/RemoveSignature/Handlers/RemoveAnnotationHandler.cs b/EnvelopeGenerator.Application/Common/Notifications/RemoveSignature/Handlers/RemoveAnnotationHandler.cs new file mode 100644 index 00000000..d64cc958 --- /dev/null +++ b/EnvelopeGenerator.Application/Common/Notifications/RemoveSignature/Handlers/RemoveAnnotationHandler.cs @@ -0,0 +1,33 @@ +using DigitalData.Core.Abstraction.Application.Repository; +using EnvelopeGenerator.Domain.Entities; +using MediatR; + +namespace EnvelopeGenerator.Application.Common.Notifications.RemoveSignature.Handlers; + +/// +/// +/// +public class RemoveAnnotationHandler : INotificationHandler +{ + private readonly IRepository _repo; + + /// + /// + /// + /// + public RemoveAnnotationHandler(IRepository repository) + { + _repo = repository; + } + + /// + /// + /// + /// + /// + /// + public Task Handle(RemoveSignatureNotification notification, CancellationToken cancel) + { + return _repo.DeleteAsync(a => a.Element!.Document.Envelope!.Uuid == notification.EnvelopeUuid, cancel); + } +} \ No newline at end of file