You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Today Pinata pagination is broken, but it was difficult to tell how exactly (they are working on a fix).
Only by having numbered pins, one can quickly understand what went wrong:
👉 pinata returns pins sorted in the wrong order (should be from the latest to the oldest)
For example, Kubo does pagination in batches of 10.
It should read 0,1,2....24,25, but it gets this broken loop:
There should be a test that
limit=10
Reason
Today Pinata pagination is broken, but it was difficult to tell how exactly (they are working on a fix).
Only by having numbered pins, one can quickly understand what went wrong:
👉 pinata returns pins sorted in the wrong order (should be from the latest to the oldest)
For example, Kubo does pagination in batches of 10.
It should read 0,1,2....24,25, but it gets this broken loop:
Behind the scenes, these requests were made (i removed
origins
so it is easier to eyeball):(1)
GET https://api.pinata.cloud/psa/pins?limit=10&status=pinned
Click to expand
(2)
https://api.pinata.cloud/psa/pins?before=2022-08-18T17%3A47%3A09Z&limit=10&status=pinned
Click to expand (2)
(3)
https://api.pinata.cloud/psa/pins?before=2022-08-18T17%3A46%3A42Z&limit=10&status=pinned
Click to expand (3)
(4)
https://api.pinata.cloud/psa/pins?before=2022-08-18T17%3A46%3A02Z&limit=10&status=pinned
Click to expand (4)
(5)
https://api.pinata.cloud/psa/pins?before=2022-08-18T17%3A45%3A42Z&limit=10&status=pinned
Click to expand (5)
The text was updated successfully, but these errors were encountered: