Issue #4: Pagination logic was repeated across multiple routes. Changes: - Add pagination.py with reusable utilities: - calculate_total_pages: computes page count from total/per_page - calculate_offset: computes offset for given page - create_paginated_response: builds PaginatedResponse with metadata - Update routes/audit.py to use pagination utilities - Update routes/booking.py to use pagination utilities - Update routes/invites.py to use pagination utilities The utilities handle the common pagination math while routes still manage their own query logic (filters, joins, ordering). |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| audit.py | ||
| auth.py | ||
| availability.py | ||
| booking.py | ||
| counter.py | ||
| invites.py | ||
| meta.py | ||
| profile.py | ||
| sum.py | ||