refactor(EnvelopeController): update EnvelopeReceiverReadOnly to use without then-calback-method
This commit is contained in:
parent
95fd16fff0
commit
e2df610544
@ -367,9 +367,14 @@ public class EnvelopeController : ViewControllerBase
|
||||
if (DateTime.Now > erro.DateValid)
|
||||
return View("EnvelopeExpired");
|
||||
|
||||
return await _envRcvService.ReadByUuidSignatureAsync(uuid: erro.Envelope!.Uuid, erro.Receiver!.Signature).ThenAsync(
|
||||
SuccessAsync: async er =>
|
||||
var erRes = await _envRcvService.ReadByUuidSignatureAsync(uuid: erro.Envelope!.Uuid, erro.Receiver!.Signature);
|
||||
if (erRes.IsFailed)
|
||||
{
|
||||
_logger.LogNotice(erRes.Notices);
|
||||
return this.ViewEnvelopeNotFound();
|
||||
}
|
||||
var er = erRes.Data;
|
||||
|
||||
var envelopeKey = (er.Envelope!.Uuid, er.Receiver!.Signature).ToEnvelopeKey();
|
||||
|
||||
//TODO: implement multi-threading to history process (Task)
|
||||
@ -396,11 +401,5 @@ public class EnvelopeController : ViewControllerBase
|
||||
_logger.LogEnvelopeError(envelopeReceiverId: envelopeKey, message: "No document byte-data was found in ENVELOPE_DOCUMENT table.");
|
||||
return this.ViewDocumentNotFound();
|
||||
}
|
||||
},
|
||||
Fail: (messages, notices) =>
|
||||
{
|
||||
_logger.LogNotice(notices);
|
||||
return this.ViewEnvelopeNotFound();
|
||||
});
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user