From 599bffd8e071d102c0b405ae021b6e22c6453d09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Thu, 16 Dec 2021 13:26:07 -0500 Subject: [PATCH] feat: pass in all query params to category search filter --- src/socket.io/categories/search.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/socket.io/categories/search.js b/src/socket.io/categories/search.js index 4d973a3f45..529ee136f4 100644 --- a/src/socket.io/categories/search.js +++ b/src/socket.io/categories/search.js @@ -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