From 02ecd8875851b41804bcbccad2bec77e5095d796 Mon Sep 17 00:00:00 2001 From: TekH Date: Wed, 22 Oct 2025 14:29:38 +0200 Subject: [PATCH] feat(TestAnnotationController): include receiver signature in RemoveSignatureNotification Updated TestAnnotationController.Delete to extract the receiver signature from the envelope key and pass it along with the envelope UUID when publishing RemoveSignatureNotification. Returns BadRequest if the signature is missing. --- .../Controllers/Test/TestAnnotationController.cs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/EnvelopeGenerator.Web/Controllers/Test/TestAnnotationController.cs b/EnvelopeGenerator.Web/Controllers/Test/TestAnnotationController.cs index c04d0485..18515b02 100644 --- a/EnvelopeGenerator.Web/Controllers/Test/TestAnnotationController.cs +++ b/EnvelopeGenerator.Web/Controllers/Test/TestAnnotationController.cs @@ -9,7 +9,7 @@ namespace EnvelopeGenerator.Web.Controllers.Test; [ApiController] public class TestAnnotationController : ControllerBase { - private IMediator _mediator; + private readonly IMediator _mediator; public TestAnnotationController(IMediator mediator) { @@ -19,12 +19,17 @@ public class TestAnnotationController : ControllerBase [HttpDelete("{envelopeKey}")] public async Task Delete([FromRoute] string envelopeKey) { - var uuid = envelopeKey.GetEnvelopeUuid(); + if (envelopeKey.GetEnvelopeUuid() is not string uuid) + return BadRequest(); - if (uuid == null) + if (envelopeKey.GetReceiverSignature() is not string signature) return BadRequest(); - await _mediator.Publish(new RemoveSignatureNotification(uuid)); + await _mediator.Publish(new RemoveSignatureNotification() + { + EnvelopeUuid = uuid, + ReceiverSignature = signature + }); return Ok(); } } \ No newline at end of file