Fix bug with determing whether another page exists when performing paginated searches
This commit is contained in:
parent
4d564365cf
commit
960a2925ca
1 changed files with 6 additions and 2 deletions
|
@ -244,11 +244,15 @@ exports.paginatedSearch = async (
|
||||||
.setSort(sort)
|
.setSort(sort)
|
||||||
.setSortOrder(sortOrder)
|
.setSortOrder(sortOrder)
|
||||||
.setSortType(sortType)
|
.setSortType(sortType)
|
||||||
|
const searchUrl = builder
|
||||||
.setBookmark(bookmark)
|
.setBookmark(bookmark)
|
||||||
.setLimit(limit)
|
.setLimit(limit)
|
||||||
const searchUrl = builder.buildSearchURL()
|
.buildSearchURL()
|
||||||
const nextUrl = builder.setLimit(1).buildSearchURL()
|
|
||||||
const searchResults = await runQuery(searchUrl)
|
const searchResults = await runQuery(searchUrl)
|
||||||
|
const nextUrl = builder
|
||||||
|
.setBookmark(searchResults.bookmark)
|
||||||
|
.setLimit(1)
|
||||||
|
.buildSearchURL()
|
||||||
const nextResults = await runQuery(nextUrl)
|
const nextResults = await runQuery(nextUrl)
|
||||||
return {
|
return {
|
||||||
...searchResults,
|
...searchResults,
|
||||||
|
|
Loading…
Reference in a new issue