refactor(BurnPdfCommand): add Report property to forward report.

- Reverse the order in which behaviors are added.
This commit is contained in:
2025-11-12 12:47:19 +01:00
parent 958bcdfc42
commit e68965543e
5 changed files with 100 additions and 6 deletions

View File

@@ -34,6 +34,8 @@ public class CreateHistoryBehavior : IPipelineBehavior<BurnPdfCommand, byte[]>
/// <returns></returns>
public async Task<byte[]> Handle(BurnPdfCommand request, RequestHandlerDelegate<byte[]> next, CancellationToken cancel)
{
var doc = await next(cancel);
if (!request.Debug)
await _sender.Send(new CreateHistoryCommand()
{
@@ -42,6 +44,6 @@ public class CreateHistoryBehavior : IPipelineBehavior<BurnPdfCommand, byte[]>
Status = EnvelopeStatus.EnvelopeReportCreated,
}, cancel);
return await next(cancel);
return doc;
}
}