Browse Source

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

Book Pauk 2 năm trước cách đây
mục cha
commit
909311328e
2 tập tin đã thay đổi với 3 bổ sung2 xóa
  1. 1 1
      client/components/Search/Search.vue
  2. 2 1
      server/core/DbSearcher.js

+ 1 - 1
client/components/Search/Search.vue

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

+ 2 - 1
server/core/DbSearcher.js

@@ -239,7 +239,8 @@ class DbSearcher {
             const authorIds = await this.getAuthorIds(query);
 
             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);
 
             //выборка найденных авторов