diff --git a/EnvelopeGenerator.Application/Pdf/BurnPdfCommand.cs b/EnvelopeGenerator.Application/Pdf/BurnPdfCommand.cs index f51f59f2..38f7fe74 100644 --- a/EnvelopeGenerator.Application/Pdf/BurnPdfCommand.cs +++ b/EnvelopeGenerator.Application/Pdf/BurnPdfCommand.cs @@ -20,6 +20,32 @@ namespace EnvelopeGenerator.Application.Pdf; /// public record BurnPdfCommand(int? EnvelopeId = null, string? EnvelopeUuid = null) : IRequest; +/// +/// +/// +public static class BurnPdfCommandExtensions +{ + /// + /// + /// + /// + /// + /// + /// + public static Task BurnPdf(this ISender sender, int envelopeId, CancellationToken cancel) + => sender.Send(new BurnPdfCommand(EnvelopeId: envelopeId), cancel); + + /// + /// + /// + /// + /// + /// + /// + public static Task BurnPdf(this ISender sender, string envelopeUuid, CancellationToken cancel) + => sender.Send(new BurnPdfCommand(EnvelopeUuid: envelopeUuid), cancel); +} + /// /// /// diff --git a/EnvelopeGenerator.Finalizer/Job/FinishEnvelopeJob.cs b/EnvelopeGenerator.Finalizer/Job/FinishEnvelopeJob.cs index 4e61a16f..94e8eb7d 100644 --- a/EnvelopeGenerator.Finalizer/Job/FinishEnvelopeJob.cs +++ b/EnvelopeGenerator.Finalizer/Job/FinishEnvelopeJob.cs @@ -11,14 +11,11 @@ namespace EnvelopeGenerator.Finalizer.Job { private readonly ILogger _logger; - private readonly GdPictureOptions _gdPictureOptions; - private readonly IMediator _mediator; - public FinishEnvelopeJob(ILogger logger, IOptions gdPictureOptions, IMediator mediator) + public FinishEnvelopeJob(ILogger logger, IMediator mediator) { _logger = logger; - _gdPictureOptions = gdPictureOptions.Value; _mediator = mediator; } @@ -28,7 +25,7 @@ namespace EnvelopeGenerator.Finalizer.Job var envelopes = await _mediator.Send(new ReadEnvelopeQuery() { - Status = new() { Include = [EnvelopeStatus.EnvelopeCompletelySigned] }, + Status = new() { Include = [ EnvelopeStatus.EnvelopeCompletelySigned ] }, HasDocResult = false }, cancel);