Pagination links problem when sorting the user's collection
There is currently a bug on the user's collection filtering when there are several collections with the same value for the sortby
parameter.
It's not really a problem for the created
/updated
parameter as it's a datetime with microseconds, so there is few cases where there will be duplicates (thus we can easily have a next
link asking for collection created > max(creation_date from previous query)), but for the datetime
parameter (the name is sadly very confusing), it's only a date
in reality as we compute the day when the first picture of the collection was taken.
So since it's a date and not a datetime, we can easily have several collection taken the same day.
For example, if we have 3 collections taken the same day, when we ask for /users/me/collection?sortby=datetime&limit=2
, the function do not output any pagination links, and I don't really know we can make a next
query to only get the third collection with the 2 previous ones.
Any thoughts @PanierAvide ?
Ping @JeanAnd that found the bug.