ThomasMatlak / food

GNU Affero General Public License v3.0
0 stars 0 forks source link

pagination #10

Open ThomasMatlak opened 1 year ago

ThomasMatlak commented 1 year ago

The API endpoints for listing all currently return EVERYTHING. Add pagination (page size, offset) to avoid potential memory issues (both in the Go application and on the client) and huge responses.

Include some max page size that is enforced on the backend.

ThomasMatlak commented 1 year ago

~Include the total count of the resource in the API response.~ Something like

{
    "total": 1491,
    "recipes": []
}