update to use IRepository<T>
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
using EnvelopeGenerator.Application.Common.Extensions;
|
||||
using EnvelopeGenerator.Application.Common.Notifications.RemoveSignature;
|
||||
using MediatR;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace EnvelopeGenerator.Web.Controllers.Test;
|
||||
|
||||
[Route("api/[controller]")]
|
||||
[ApiController]
|
||||
public class TestAnnotationController : ControllerBase
|
||||
{
|
||||
private IMediator _mediator;
|
||||
|
||||
public TestAnnotationController(IMediator mediator)
|
||||
{
|
||||
_mediator = mediator;
|
||||
}
|
||||
|
||||
[HttpDelete("{envelopeKey}")]
|
||||
public async Task<IActionResult> Delete([FromRoute] string envelopeKey)
|
||||
{
|
||||
var uuid = envelopeKey.GetEnvelopeUuid();
|
||||
|
||||
if (uuid == null)
|
||||
return BadRequest();
|
||||
|
||||
await _mediator.Publish(new RemoveSignatureNotification(uuid));
|
||||
return Ok();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user