Add envelope finalize endpoint

This commit is contained in:
2026-10-22 01:35:26 +02:00
parent fb155fe706
commit 226d852c6f

View File

@@ -5,6 +5,7 @@ using MediatR;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json;
using EnvelopeGenerator.Application.PdfSigning;
namespace EnvelopeGenerator.Server.Controllers;
@@ -123,4 +124,17 @@ public class EnvelopeController : ControllerBase
return Ok(result);
}
/// <summary>
///
/// </summary>
/// <param name="command"></param>
/// <returns></returns>
[Authorize(AuthenticationSchemes = AuthScheme.Sender)]
[HttpPost("finalize")]
public async Task<IActionResult> FinalizeEnvelopeAsync([FromQuery] FinalizeEnvelopeCommand command)
{
await _mediator.Send(command.Authorized(User.GetId()));
return Ok();
}
}