This pull request addresses an issue with the /tables/invoices/rows API endpoint. When a request is sent to this endpoint, the response includes the data in the invoices column, as well as next and prev keys that allow the user to navigate between pages of results. However, as seen in the example response below, the URL parameters in the next field are incorrect. Specifically, the page parameter should be updated to _page, and if a user passes other parameters such as _ordering, _filters, _limit, _schema, _extend, and _search, these parameters are not displayed in the next and prev fields.
To address this issue, I have modified the code in the core/src/controllers/rows.js file. Specifically, I have ensured that all query parameters that are added by the user are included in the next and prev fields of the API response. This ensures that users can properly navigate between pages of results, even when additional query parameters are present.
Purpose of PR
/tables/invoices/rows
API endpoint. When a request is sent to this endpoint, the response includes the data in theinvoices
column, as well asnext
andprev
keys that allow the user to navigate between pages of results. However, as seen in the example response below, the URL parameters in thenext
field are incorrect. Specifically, thepage
parameter should be updated to_page
, and if a user passes other parameters such as_ordering
,_filters
,_limit
,_schema
,_extend
, and_search
, these parameters are not displayed in thenext
andprev
fields.Example response:
Modification
To address this issue, I have modified the code in the
core/src/controllers/rows.js
file. Specifically, I have ensured that all query parameters that are added by the user are included in thenext
andprev
fields of the API response. This ensures that users can properly navigate between pages of results, even when additional query parameters are present.To test this PR you can use the URL below