remove envelopeRejected-endpoint

This commit is contained in:
2025-09-17 13:17:25 +02:00
parent cf3535b4de
commit 10b1de4cf0
3 changed files with 3 additions and 31 deletions

View File

@@ -160,6 +160,7 @@ public class HomeController : ViewControllerBase
var rejRcvrs = await _historyService.ReadRejectingReceivers(er.Envelope!.Id);
if (rejRcvrs.Any())
{
await HttpContext.SignOutAsync(CookieAuthenticationDefaults.AuthenticationScheme);
ViewBag.IsExt = !rejRcvrs.Contains(er.Receiver); //external if the current user is not rejected
return View("EnvelopeRejected", er);
}
@@ -370,35 +371,6 @@ public class HomeController : ViewControllerBase
}
}
[Authorize(Roles = ReceiverRole.FullyAuth)]
[HttpGet("{envelopeReceiverId}/Rejected")]
[Obsolete("Use MediatR")]
public async Task<IActionResult> EnvelopeRejected([FromRoute] string envelopeReceiverId)
{
try
{
await HttpContext.SignOutAsync(CookieAuthenticationDefaults.AuthenticationScheme);
return await _envRcvService.ReadByEnvelopeReceiverIdAsync(envelopeReceiverId).ThenAsync(
SuccessAsync: async (er) =>
{
return await _historyService.IsRejected(envelopeId: er.EnvelopeId)
? View(er)
: Redirect($"/Envelope/{envelopeReceiverId}/Locked");
},
Fail: IActionResult (messages, notices) =>
{
_logger.LogNotice(notices);
return this.ViewEnvelopeNotFound();
});
}
catch (Exception ex)
{
_logger.LogEnvelopeError(envelopeReceiverId: envelopeReceiverId, exception: ex);
return this.ViewInnerServiceError();
}
}
[HttpGet("{readOnlyKey}/ReadOnly")]
[Obsolete("Use MediatR")]
public async Task<IActionResult> EnvelopeReceiverReadOnly([FromRoute] string readOnlyKey)