mirror of
https://github.com/johrpan/musicus_mobile.git
synced 2025-10-27 11:17:25 +01:00
server: Add pagination and search
This commit is contained in:
parent
f81c3ed940
commit
a39195d2c4
5 changed files with 15 additions and 10 deletions
|
|
@ -7,8 +7,9 @@ class EnsemblesController extends ResourceController {
|
|||
EnsemblesController(this.db);
|
||||
|
||||
@Operation.get()
|
||||
Future<Response> getEnsembles() async {
|
||||
final ensembles = await db.allEnsembles().get();
|
||||
Future<Response> getEnsembles(
|
||||
[@Bind.query('p') int page, @Bind.query('s') String search]) async {
|
||||
final ensembles = await db.getEnsembles(page, search);
|
||||
return Response.ok(ensembles);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue