add DocSignedNotificationStatusHandler and implement the natification into EnveloepControler
This commit is contained in:
@@ -13,6 +13,8 @@ using System.Dynamic;
|
||||
using EnvelopeGenerator.Application.EnvelopeReceivers.Queries;
|
||||
using EnvelopeGenerator.Application.DocStatus.Commands;
|
||||
using Newtonsoft.Json;
|
||||
using EnvelopeGenerator.Application.Common.Notifications;
|
||||
using DigitalData.Core.Exceptions;
|
||||
|
||||
namespace EnvelopeGenerator.Web.Controllers;
|
||||
|
||||
@@ -64,7 +66,11 @@ public class EnvelopeController : BaseController
|
||||
if (await _mediator.IsSignedAsync(uuid, signature, cancel))
|
||||
return Problem(statusCode: 403);
|
||||
|
||||
await _mediator.SignDocAsync(uuid, signature, JsonConvert.SerializeObject(annotations), cancel);
|
||||
var notification = await _mediator.ReadEnvelopeReceiverAsync(envelopeKey, cancel)
|
||||
.ToDocSignedNotification(annotations)
|
||||
?? throw new NotFoundException("Envelope receiver is not found.");
|
||||
|
||||
await _mediator.Publish(notification, cancel);
|
||||
|
||||
EnvelopeReceiver response = await envelopeService.LoadEnvelope(envelopeKey);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user