diff --git a/src/domain-services/flows/flow-search-service.ts b/src/domain-services/flows/flow-search-service.ts index 9fb870a8..dfb007e8 100644 --- a/src/domain-services/flows/flow-search-service.ts +++ b/src/domain-services/flows/flow-search-service.ts @@ -271,7 +271,7 @@ export class FlowSearchService { flows: items, hasNextPage: limit <= flows.length, hasPreviousPage: nextPageCursor !== undefined, - prevPageCursor: nextPageCursor ?? 0, + prevPageCursor: nextPageCursor ? nextPageCursor - limit : 0, nextPageCursor: nextPageCursor ? nextPageCursor + limit : limit, pageSize: flows.length, sortField: `${orderBy.entity}.${orderBy.column}` as FlowSortField,