[Bug] REST API v1 /topics calls return wrong count
I recently ran into issues when trying to build a custom pagination component that was sometimes trying to get the total amount of topics/threads via /threads and other times via /topics, the results were inconsistent. After some digging it seems, that all /topics calls for REST API v1 return a wrong count for the total amount of threads/topics. In the example that follows, the correct count is 17, but /topics or /topics/count both return 18.
this is a call to /topics on a tkb board node, obviously the total amount of messages/topics is 17 (as seen in the "messages": [] property of the response, nonetheless the "count" property of the response says 18, a call to /topics/count returns 18 as well.
This is a call to /threads on the same node (any url params are exactly the same!): as can be seen there is a) no "count" returned, which is inconsistent BTW =) and b) the "thread": [] property holds again 17 items, a call to /threads/count also returns 17
When doing the same via API v2 the correct count/size of items is returned as well: 17
I'm not sure how long this is an issue, anybody had the same issue? Or maybe DougS knows about that or even has a good explanation why this is?