Signaturprüfung zur Filterung der Umschlagempfänger hinzugefügt

This commit is contained in:
Developer 02
2024-04-08 16:22:17 +02:00
parent db83eb90ee
commit 2512de0f26
9 changed files with 38 additions and 25 deletions

View File

@@ -9,6 +9,6 @@ namespace EnvelopeGenerator.Application.Contracts
{
Task<IServiceResult<IEnumerable<EnvelopeDto>>> ReadAllWithAsync(bool documents = false, bool receivers = false, bool history = false, bool documentReceiverElement = false);
Task<IServiceResult<EnvelopeDto>> ReadByUuidAsync(string uuid, bool withDocuments = false, bool withReceivers = false, bool withHistory = false, bool withDocumentReceiverElement = false);
Task<IServiceResult<EnvelopeDto>> ReadByUuidAsync(string uuid, string? signature = null, bool withDocuments = false, bool withReceivers = false, bool withHistory = false, bool withDocumentReceiverElement = false);
}
}

View File

@@ -1,4 +1,6 @@
namespace EnvelopeGenerator.Application.DTOs
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Application.DTOs
{
public record EnvelopeReceiverDto(
int EnvelopeId,
@@ -9,5 +11,7 @@
string CompanyName,
string PrivateMessage,
DateTime AddedWhen,
DateTime? ChangedWhen);
DateTime? ChangedWhen,
Envelope? Envelope,
Receiver? Receiver);
}

View File

@@ -23,9 +23,9 @@ namespace EnvelopeGenerator.Application.Services
return Successful(readDto);
}
public async Task<IServiceResult<EnvelopeDto>> ReadByUuidAsync(string uuid, bool withDocuments = false, bool withReceivers = false, bool withHistory = false, bool withDocumentReceiverElement = false)
public async Task<IServiceResult<EnvelopeDto>> ReadByUuidAsync(string uuid, string? signature = null, bool withDocuments = false, bool withReceivers = false, bool withHistory = false, bool withDocumentReceiverElement = false)
{
var envelope = await _repository.ReadByUuidAsync(uuid: uuid, withDocuments: withDocuments, withReceivers: withReceivers, withHistory: withHistory, withDocumentReceiverElement: withDocumentReceiverElement);
var envelope = await _repository.ReadByUuidAsync(uuid: uuid, signature: signature, withDocuments: withDocuments, withReceivers: withReceivers, withHistory: withHistory, withDocumentReceiverElement: withDocumentReceiverElement);
if (envelope is null)
return Failed<EnvelopeDto>();