mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-02 03:55:55 +01:00
feat: pass in all query params to category search filter
This commit is contained in:
@@ -50,12 +50,10 @@ module.exports = function (SocketCategories) {
|
||||
};
|
||||
|
||||
async function findMatchedCids(uid, data) {
|
||||
const result = await categories.search({
|
||||
uid: uid,
|
||||
query: data.search,
|
||||
paginate: false,
|
||||
});
|
||||
|
||||
const params = { ...data, uid, paginate: false };
|
||||
params.query = data.search;
|
||||
params.qs = data.query;
|
||||
const result = await categories.search(params);
|
||||
|
||||
let matchedCids = result.categories.map(c => c.cid);
|
||||
// no need to filter if all 3 states are used
|
||||
|
||||
Reference in New Issue
Block a user