refactor: move CreateAnnotationCommand extension to separate static class
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user