nodebb-plugin-dbsearch 6.2.4 → 6.2.5
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 -2
- package/package.json +1 -1
package/lib/dbsearch.js
CHANGED
|
@@ -273,7 +273,8 @@ async function reIndexTopics() {
|
|
|
273
273
|
|
|
274
274
|
async function topicsSave(topics) {
|
|
275
275
|
topics = topics.filter(
|
|
276
|
-
t => t && t.tid && parseInt(t.deleted, 10) !== 1 &&
|
|
276
|
+
t => t && utils.isNumber(t.tid) && parseInt(t.deleted, 10) !== 1 &&
|
|
277
|
+
!pluginConfig.excludeCategories.includes(String(t.cid))
|
|
277
278
|
);
|
|
278
279
|
|
|
279
280
|
let data = topics.map((topicData) => {
|
|
@@ -325,7 +326,8 @@ async function reIndexPosts() {
|
|
|
325
326
|
|
|
326
327
|
async function postsSave(posts) {
|
|
327
328
|
posts = posts.filter(
|
|
328
|
-
p => p && p.pid && parseInt(p.deleted, 10) !== 1 &&
|
|
329
|
+
p => p && utils.isNumber(p.pid) && parseInt(p.deleted, 10) !== 1 &&
|
|
330
|
+
!pluginConfig.excludeCategories.includes(String(p.cid))
|
|
329
331
|
);
|
|
330
332
|
|
|
331
333
|
let data = posts.map((postData) => {
|