refactor(RemoveSignatureNotification): update handlers to throw exception if there is no filter
This commit is contained in:
parent
af14ef7ce5
commit
90e10d3d04
@ -28,6 +28,7 @@ public class RemoveAnnotationHandler : INotificationHandler<RemoveSignatureNotif
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public Task Handle(RemoveSignatureNotification notification, CancellationToken cancel)
|
public Task Handle(RemoveSignatureNotification notification, CancellationToken cancel)
|
||||||
{
|
{
|
||||||
|
notification.ThrowIfHasNoFilter();
|
||||||
return _repo.DeleteAsync(annots =>
|
return _repo.DeleteAsync(annots =>
|
||||||
{
|
{
|
||||||
// envelope ID filter
|
// envelope ID filter
|
||||||
|
|||||||
@ -28,6 +28,7 @@ public class RemoveDocStatusHandler : INotificationHandler<RemoveSignatureNotifi
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public Task Handle(RemoveSignatureNotification notification, CancellationToken cancel)
|
public Task Handle(RemoveSignatureNotification notification, CancellationToken cancel)
|
||||||
{
|
{
|
||||||
|
notification.ThrowIfHasNoFilter();
|
||||||
return _repo.DeleteAsync(statuses =>
|
return _repo.DeleteAsync(statuses =>
|
||||||
{
|
{
|
||||||
// envelope ID filter
|
// envelope ID filter
|
||||||
|
|||||||
@ -29,6 +29,7 @@ public class RemoveHistoryHandler : INotificationHandler<RemoveSignatureNotifica
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public Task Handle(RemoveSignatureNotification notification, CancellationToken cancel)
|
public Task Handle(RemoveSignatureNotification notification, CancellationToken cancel)
|
||||||
{
|
{
|
||||||
|
notification.ThrowIfHasNoFilter();
|
||||||
return _repo.DeleteAsync(hists =>
|
return _repo.DeleteAsync(hists =>
|
||||||
{
|
{
|
||||||
hists = hists.Where(hist => hist.Status == EnvelopeStatus.DocumentSigned);
|
hists = hists.Where(hist => hist.Status == EnvelopeStatus.DocumentSigned);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user