mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-19 02:50:53 +01:00
fix: #13715, dont reduce hardcap if usersPerPage is < 50
This commit is contained in:
@@ -119,8 +119,7 @@ module.exports = function (User) {
|
|||||||
const min = query;
|
const min = query;
|
||||||
const max = query.substr(0, query.length - 1) + String.fromCharCode(query.charCodeAt(query.length - 1) + 1);
|
const max = query.substr(0, query.length - 1) + String.fromCharCode(query.charCodeAt(query.length - 1) + 1);
|
||||||
|
|
||||||
const resultsPerPage = meta.config.userSearchResultsPerPage;
|
hardCap = hardCap || 500;
|
||||||
hardCap = hardCap || resultsPerPage * 10;
|
|
||||||
|
|
||||||
const data = await db.getSortedSetRangeByLex(`${searchBy}:sorted`, min, max, 0, hardCap);
|
const data = await db.getSortedSetRangeByLex(`${searchBy}:sorted`, min, max, 0, hardCap);
|
||||||
// const uids = data.map(data => data.split(':').pop());
|
// const uids = data.map(data => data.split(':').pop());
|
||||||
|
|||||||
Reference in New Issue
Block a user