refactor(ReadHistoryQuery): update to not throw exception.

- update controller to throw NotFound if the list is empty
This commit is contained in:
Developer 02
2025-08-28 18:30:27 +02:00
parent f7c988be9b
commit dad43de8b1
5 changed files with 7 additions and 12 deletions

View File

@@ -27,7 +27,7 @@ public class TestEnvelopeReceiverController : ControllerBase
[HttpGet]
public async Task<IActionResult> Get([FromQuery] ReadEnvelopeReceiverQuery q, CancellationToken cancel)
=> Ok(await _mediator.Send(q, cancel).ThrowIfNull(Exceptions.NotFound));
=> Ok(await _mediator.Send(q, cancel).ThrowIfEmpty(Exceptions.NotFound));
[Obsolete("Use MediatR")]
[HttpGet("verify-access-code/{envelope_receiver_id}")]