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 (uuid == null) + if (envelopeKey.GetEnvelopeUuid() is not string uuid) return BadRequest(); - await _mediator.Publish(new RemoveSignatureNotification(uuid)); + if (envelopeKey.GetReceiverSignature() is not string signature) + return BadRequest(); + + await _mediator.Publish(new RemoveSignatureNotification() + { + EnvelopeUuid = uuid, + ReceiverSignature = signature + }); return Ok(); } } \ No newline at end of file