refactor: apply review suggestions

Signed-off-by: Camila Belo <camilaibs@gmail.com>
This commit is contained in:
Camila Belo
2022-10-03 13:50:14 +02:00
parent a799972bb1
commit 4ed1fa2480
6 changed files with 34 additions and 14 deletions
@@ -137,7 +137,7 @@ export class PgSearchEngine implements SearchEngine {
query: SearchQuery,
options: PgSearchQueryTranslatorOptions,
): ConcretePgSearchQuery {
const pageSize = 25;
const pageSize = query.pageLimit || 25;
const { page } = decodePageCursor(query.pageCursor);
const offset = page * pageSize;
// We request more result to know whether there is another page