Refactor status parameter to use EnvelopeStatus type

Updated IEnvelopeHistoryRepository and IEnvelopeHistoryService
interfaces to replace int? status with Constants.EnvelopeStatus?
status in CountAsync and ReadAsync methods. Adjusted
ReadHistoryQueryHandler and EnvelopeHistoryService methods to
accommodate the new type. Modified EnvelopeHistoryRepository
to accept Constants.EnvelopeStatus? in relevant methods and
marked it as obsolete, suggesting a future refactor.
This commit is contained in:
2025-06-27 09:17:03 +02:00
parent 0800e4d13e
commit 2a4255e5a3
5 changed files with 18 additions and 15 deletions

View File

@@ -34,7 +34,7 @@ public class ReadHistoryQueryHandler : IRequestHandler<ReadHistoryQuery, IEnumer
/// <exception cref="NotFoundException"></exception>
public async Task<IEnumerable<ReadHistoryResponse>> Handle(ReadHistoryQuery request, CancellationToken cancellationToken)
{
var hists = await _repository.ReadAsync(request.EnvelopeId, status: request.Status is null ? null : (int) request.Status);
var hists = await _repository.ReadAsync(request.EnvelopeId, status: request.Status is null ? null : request.Status);
if (!hists.Any())
throw new NotFoundException();