Refaktorisierung der DecodeEnvelopeReceiverId-Methode in EnvelopeGeneratorExtensions
This commit is contained in:
@@ -20,27 +20,15 @@ namespace EnvelopeGenerator.Web.Controllers
|
||||
}
|
||||
|
||||
[HttpGet("api/envelope/{envelopeKey}")]
|
||||
public async Task<IActionResult> Get(string envelopeKey)
|
||||
public async Task<IActionResult> Get([FromRoute] string envelopeKey, [FromBody] string accessCode)
|
||||
{
|
||||
//_logger.LogInformation($"Loading Envelope by Key [{envelopeKey}]");
|
||||
|
||||
//Tuple<string, string> result = Helpers.DecodeEnvelopeReceiverId(envelopeKey);
|
||||
//var envelopeUuid = result.Item1;
|
||||
//var receiverSignature = result.Item2;
|
||||
////var receiverId = receiverModel.GetReceiverIdBySignature(receiverSignature);
|
||||
|
||||
////_logger.LogInformation("Resolved receiver signature to receiverId [{0}]", receiverId);
|
||||
|
||||
//var envlopeServiceResult = await _envelopeService.ReadByUuidAsync(envelopeUuid, withDocuments:true, withReceivers:true, withHistory:true);
|
||||
|
||||
//_logger.LogInformation("Loading envelope..");
|
||||
|
||||
try
|
||||
{
|
||||
// Validate Envelope Key and load envelope
|
||||
envelopeService.EnsureValidEnvelopeKey(envelopeKey);
|
||||
EnvelopeResponse response = await envelopeService.LoadEnvelope(envelopeKey);
|
||||
|
||||
EnvelopeResponse response = await envelopeService.LoadEnvelope(envelopeKey);
|
||||
|
||||
if (envelopeService.ReceiverAlreadySigned(response.Envelope, response.Receiver.Id) == true)
|
||||
{
|
||||
return Problem(statusCode: 403);
|
||||
|
||||
Reference in New Issue
Block a user