@dunx/create-app 2.1.0 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -96,7 +96,7 @@ export class LedgerController {
|
|
|
96
96
|
* `/ledger/page` cannot be swallowed by `/ledger/:id`.
|
|
97
97
|
*/
|
|
98
98
|
@Get('/page', pagedEntries)
|
|
99
|
-
page(input: Input<typeof pagedEntries>):
|
|
99
|
+
page(input: Input<typeof pagedEntries>): Page<Entry> {
|
|
100
100
|
return this.ledger.page(input.query);
|
|
101
101
|
}
|
|
102
102
|
|
|
@@ -63,10 +63,11 @@ export class Ledger implements OnInit, OnShutdown {
|
|
|
63
63
|
* so `paginate` falls back to the primary key - `id` is unique on its own, so no
|
|
64
64
|
* tie-break column is needed.
|
|
65
65
|
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
66
|
+
* Synchronous, because `paginate`'s return type follows its `db`: a
|
|
67
|
+
* `drizzle-orm/bun-sqlite` handle answers `all()` rather than a promise, so this
|
|
68
|
+
* method needs no `async` and neither does its caller.
|
|
68
69
|
*/
|
|
69
|
-
page(options: PageOptions):
|
|
70
|
+
page(options: PageOptions): Page<Entry> {
|
|
70
71
|
return paginate<typeof ledger, Entry>({
|
|
71
72
|
db: this.db,
|
|
72
73
|
table: ledger,
|