Поправки лимита

This commit is contained in:
Book Pauk
2022-08-20 21:39:58 +07:00
parent ff5e3b28d0
commit 909311328e
2 changed files with 3 additions and 2 deletions

View File

@@ -158,7 +158,7 @@ class Search {
title = ''; title = '';
genre = ''; genre = '';
lang = ''; lang = '';
limit = 100; limit = 50;
//stuff //stuff
queryFound = -1; queryFound = -1;

View File

@@ -239,7 +239,8 @@ class DbSearcher {
const authorIds = await this.getAuthorIds(query); const authorIds = await this.getAuthorIds(query);
const totalFound = authorIds.length; const totalFound = authorIds.length;
const limit = (query.limit ? query.limit : 1000); let limit = (query.limit ? query.limit : 100);
limit = (limit > 1000 ? 1000 : limit);
const offset = (query.offset ? query.offset : 0); const offset = (query.offset ? query.offset : 0);
//выборка найденных авторов //выборка найденных авторов