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.
Files changed (2) hide show
  1. package/lib/dbsearch.js +4 -1
  2. 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
- const limit = data.index === 'post' ? pluginConfig.postLimit : pluginConfig.topicLimit;
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-plugin-dbsearch",
3
- "version": "6.2.3",
3
+ "version": "6.2.4",
4
4
  "description": "A Plugin that lets users search posts and topics",
5
5
  "main": "index.js",
6
6
  "repository": {