more flex and filters
This commit is contained in:
@@ -20,10 +20,16 @@ public sealed class RegistersController : ControllerBase
|
||||
|
||||
// ---- Bank accounts ----
|
||||
|
||||
/// <summary>List bank accounts (paged).</summary>
|
||||
/// <summary>List bank accounts (paged, optionally filtered and sorted).</summary>
|
||||
[HttpGet("bank-accounts")]
|
||||
public async Task<IActionResult> ListBankAccounts([FromQuery] int page = 1, [FromQuery] int pageSize = 20, CancellationToken ct = default)
|
||||
=> Ok(await _service.ListBankAccountsAsync(page, pageSize, ct));
|
||||
public async Task<IActionResult> ListBankAccounts(
|
||||
[FromQuery] int page = 1,
|
||||
[FromQuery] int pageSize = 20,
|
||||
[FromQuery] string? filter = null,
|
||||
[FromQuery] string? filtertype = null,
|
||||
[FromQuery] string? sort = null,
|
||||
CancellationToken ct = default)
|
||||
=> Ok(await _service.ListBankAccountsAsync(page, pageSize, filter, filtertype, sort, ct));
|
||||
|
||||
/// <summary>Get a bank account detail by id.</summary>
|
||||
[HttpGet("bank-accounts/{id:int}")]
|
||||
@@ -47,10 +53,16 @@ public sealed class RegistersController : ControllerBase
|
||||
|
||||
// ---- VAT rates (read-only) ----
|
||||
|
||||
/// <summary>List VAT rates (paged).</summary>
|
||||
/// <summary>List VAT rates (paged, optionally filtered and sorted).</summary>
|
||||
[HttpGet("vat-rates")]
|
||||
public async Task<IActionResult> ListVatRates([FromQuery] int page = 1, [FromQuery] int pageSize = 20, CancellationToken ct = default)
|
||||
=> Ok(await _service.ListVatRatesAsync(page, pageSize, ct));
|
||||
public async Task<IActionResult> ListVatRates(
|
||||
[FromQuery] int page = 1,
|
||||
[FromQuery] int pageSize = 20,
|
||||
[FromQuery] string? filter = null,
|
||||
[FromQuery] string? filtertype = null,
|
||||
[FromQuery] string? sort = null,
|
||||
CancellationToken ct = default)
|
||||
=> Ok(await _service.ListVatRatesAsync(page, pageSize, filter, filtertype, sort, ct));
|
||||
|
||||
/// <summary>Get a VAT rate detail by id.</summary>
|
||||
[HttpGet("vat-rates/{id:int}")]
|
||||
@@ -59,8 +71,14 @@ public sealed class RegistersController : ControllerBase
|
||||
|
||||
// ---- Numeric sequences (read-only) ----
|
||||
|
||||
/// <summary>List numeric (document) sequences (paged).</summary>
|
||||
/// <summary>List numeric (document) sequences (paged, optionally filtered and sorted).</summary>
|
||||
[HttpGet("numeric-sequences")]
|
||||
public async Task<IActionResult> ListNumericSequences([FromQuery] int page = 1, [FromQuery] int pageSize = 20, CancellationToken ct = default)
|
||||
=> Ok(await _service.ListNumericSequencesAsync(page, pageSize, ct));
|
||||
public async Task<IActionResult> ListNumericSequences(
|
||||
[FromQuery] int page = 1,
|
||||
[FromQuery] int pageSize = 20,
|
||||
[FromQuery] string? filter = null,
|
||||
[FromQuery] string? filtertype = null,
|
||||
[FromQuery] string? sort = null,
|
||||
CancellationToken ct = default)
|
||||
=> Ok(await _service.ListNumericSequencesAsync(page, pageSize, filter, filtertype, sort, ct));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user