refactor: move CreateAnnotationCommand extension to separate static class

This commit is contained in:
2025-10-13 17:15:00 +02:00
parent d10f19d92a
commit ecc7552951
2 changed files with 26 additions and 3 deletions

View File

@@ -1,4 +1,5 @@
using EnvelopeGenerator.Application.Common.Extensions;
using EnvelopeGenerator.Application.Annotations.Commands;
using EnvelopeGenerator.Application.Common.Extensions;
using EnvelopeGenerator.Application.Common.Notifications.RemoveSignature;
using MediatR;
using Microsoft.AspNetCore.Mvc;
@@ -27,4 +28,11 @@ public class TestAnnotationController : ControllerBase
await _mediator.Publish(new RemoveSignatureNotification(uuid));
return Ok();
}
[HttpPost("{envelopeKey}")]
public async Task<IActionResult> Create([FromRoute] string envelopeKey, CancellationToken cancel)
{
var annot = await _mediator.CreateAnnotation(envelopeKey, cancel);
return Ok(annot);
}
}