EnvelopeController aktualisiert, um das Ablehnen von Umschlägen mit optionalem Grund zu ermöglichen.

This commit is contained in:
Developer 02
2024-06-04 16:34:15 +02:00
parent 33f161a5fe
commit f16a8bcdb9
3 changed files with 5 additions and 5 deletions

View File

@@ -115,7 +115,7 @@ namespace EnvelopeGenerator.Web.Controllers
[Authorize]
[HttpPost("reject")]
public async Task<IActionResult> Reject()
public async Task<IActionResult> Reject([FromBody] string? reason = null)
{
try
{
@@ -137,7 +137,7 @@ namespace EnvelopeGenerator.Web.Controllers
return Unauthorized();
}
return await _histService.RecordAsync(envRcvRes.Data.EnvelopeId, userReference: mail, EnvelopeStatus.DocumentRejected).ThenAsync(
return await _histService.RecordAsync(envRcvRes.Data.EnvelopeId, userReference: mail, EnvelopeStatus.DocumentRejected, comment: reason).ThenAsync(
Success: id => NoContent(),
Fail: IActionResult (mssg, ntc) =>
{