remove envelopeRejected-endpoint
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user