bugfix: GET /me/bookmarks returns total count (0.19.2)

The profile overview's bookmark counter showed 0 even when the user had bookmarks because /me/bookmarks left page.total null. Repo now returns the count alongside the rows; handler uses with_total.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
MechaCat02
2026-05-17 18:41:27 +02:00
parent 58e637085d
commit 21f44cea3f
6 changed files with 17 additions and 8 deletions

View File

@@ -433,5 +433,8 @@ async fn list_me_returns_paged_envelope(pool: PgPool) {
assert!(body["items"].is_array());
assert_eq!(body["page"]["limit"], 50);
assert_eq!(body["page"]["offset"], 0);
assert!(body["page"]["total"].is_null());
// `total` is the unfiltered row count, returned so callers (e.g.
// the profile overview's bookmark counter) can show a number
// without paging through.
assert_eq!(body["page"]["total"], 0);
}