Enhance ReadByUsernameAsync with status filtering
Updated the `ReadByUsernameAsync` method in the `EnvelopeReceiverController` to accept additional parameters: `min_status`, `max_status`, and `ignore_statuses`. These parameters are now derived from the `envelopeReceiver` object, allowing for improved status filtering when retrieving records by username.
This commit is contained in:
parent
cec79e5b6d
commit
b9c4f7da1c
@ -83,7 +83,12 @@ public class EnvelopeReceiverController : ControllerBase
|
|||||||
return StatusCode(StatusCodes.Status500InternalServerError);
|
return StatusCode(StatusCodes.Status500InternalServerError);
|
||||||
}
|
}
|
||||||
|
|
||||||
return await _erService.ReadByUsernameAsync(username: username).ThenAsync(
|
return await _erService.ReadByUsernameAsync(
|
||||||
|
username: username,
|
||||||
|
min_status: envelopeReceiver.Status?.Min ?? envelopeReceiver.Envelope?.Status,
|
||||||
|
max_status:envelopeReceiver.Status?.Max ?? envelopeReceiver.Envelope?.Status,
|
||||||
|
ignore_statuses: envelopeReceiver.Status?.Ignore ?? Array.Empty<int>())
|
||||||
|
.ThenAsync(
|
||||||
Success: Ok,
|
Success: Ok,
|
||||||
Fail: IActionResult (msg, ntc) =>
|
Fail: IActionResult (msg, ntc) =>
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user