Currently, the dashboard only fetches the first page of links to display on the link-list page. The goal would be to support an arbitrary number of pages, since any links not on the first page are never displayed on the backstroke dashboard.
Here's an example response of GET https://api.backstroke.co/v1/links?page=3, the endpoint that fetches all links:
The easier of the two, the COLLECTION_LINKS_FETCH action could fetch all pages of links by recursively calling fetch until response.data's length is 0.
Another possibility would be to update the COLLECTION_LINKS_FETCH action to accept a page number as one of its arguments, and only fetch that page of data. Then, some sort of ui component would need to be created to allow the user to page through the data that the server returns.
If you have a different idea not related to 1 or 2 above, I'm open to it! Those are just the two ideas that I thought of. Thanks for contributing to Backstroke!
Currently, the dashboard only fetches the first page of links to display on the
link-list
page. The goal would be to support an arbitrary number of pages, since any links not on the first page are never displayed on the backstroke dashboard.Here's an example response of
GET https://api.backstroke.co/v1/links?page=3
, the endpoint that fetches all links:I see two possible ways of approaching this:
response.data
's length is0
.If you have a different idea not related to 1 or 2 above, I'm open to it! Those are just the two ideas that I thought of. Thanks for contributing to Backstroke!