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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user