nodebb-plugin-dbsearch 6.2.3 → 6.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/dbsearch.js +4 -1
- package/package.json +1 -1
package/lib/dbsearch.js
CHANGED
|
@@ -177,7 +177,10 @@ search.filterSearchQuery = async function (data) {
|
|
|
177
177
|
if (!data || !data.index) {
|
|
178
178
|
return data;
|
|
179
179
|
}
|
|
180
|
-
|
|
180
|
+
let limit = data.index === 'post' ? pluginConfig.postLimit : pluginConfig.topicLimit;
|
|
181
|
+
if (data.limit) {
|
|
182
|
+
limit = data.limit;
|
|
183
|
+
}
|
|
181
184
|
const query = {};
|
|
182
185
|
if (data.hasOwnProperty('cid')) {
|
|
183
186
|
query.cid = data.cid;
|