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