Use this file to discover all available pages before exploring further.
This endpoint returns all reservations that have been reviewed and accepted by a lawyer — that is, every document in the database where reservation_accepted is true. Results are sorted by _id in descending order so the most recently created reservations appear first. Pagination is handled automatically by the Paginate middleware using URL path parameters.
Pagination is controlled by two optional URL path parameters passed to the Paginate middleware before the main handler runs:
Parameter
Location
Default
Description
perpage
req.params.perpage
10
Number of records to return per page.
pag
req.params.pag
0
Current page number. Pages greater than 1 are offset by pag - 1 (e.g., page 2 skips the first perpage records). Page 1 or any value ≤ 1 starts from the beginning (skip 0).
The middleware writes the computed values into req.body.skippag (how many records to skip) and req.body.limit (how many to return). These are used directly in the Mongoose query.