Account filter endpoint seem not working well.
Closed this issue · 1 comments
AnthonyLaw commented
it showed around 62 items on the list.
Query with pageSize=100
and pageNumber=1
It showed empty data in pageNumber=2
and pageSize=25
Expected result pageNumber=4
should be empty rather than pageNumber=2
pacuum commented
I guess your fix won't work?
The problem occurs because it queries to Mongo twice and skip()
is used in the both of the queries.
- In the first query, it sorts accounts by balance and takes the second page
- In the second query, it queries data by id so there must be only one page but because of
skip()
condition it takes the second page, which is blank
So to solve this problem, you can clear pageIndex
from the options
parameter to queryPagedDocuments