From de22a078c066da363095fcdc148f67dc5b4b8365 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Wed, 31 Jul 2024 16:50:20 +0100 Subject: [PATCH] Adding bookmark to each subsequent (thanks tests ). --- packages/server/src/sdk/app/rows/search/external.ts | 2 +- packages/server/src/sdk/app/rows/search/sqs.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/server/src/sdk/app/rows/search/external.ts b/packages/server/src/sdk/app/rows/search/external.ts index 76f00a25e2..f47f6f7998 100644 --- a/packages/server/src/sdk/app/rows/search/external.ts +++ b/packages/server/src/sdk/app/rows/search/external.ts @@ -141,7 +141,7 @@ export async function search( // need wrapper object for bookmarks etc when paginating const response: SearchResponse = { rows: processed, hasNextPage } if (hasNextPage && bookmark != null) { - response.bookmark = processed.length + response.bookmark = bookmark + processed.length } if (totalRows != null) { response.totalRows = totalRows diff --git a/packages/server/src/sdk/app/rows/search/sqs.ts b/packages/server/src/sdk/app/rows/search/sqs.ts index 2b3ed0c087..f3168a4462 100644 --- a/packages/server/src/sdk/app/rows/search/sqs.ts +++ b/packages/server/src/sdk/app/rows/search/sqs.ts @@ -382,7 +382,7 @@ export async function search( // check for pagination if (paginate && nextRow) { response.hasNextPage = true - response.bookmark = processed.length + response.bookmark = bookmark + processed.length } if (paginate && !nextRow) { response.hasNextPage = false