Browse Source

Move every Lists.find(idOrFirstObjectSelector, options) to the ReactiveCache (directory server/)

Martin Filser 2 năm trước cách đây
mục cha
commit
1c966ed7b4
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      server/publications/cards.js

+ 2 - 2
server/publications/cards.js

@@ -282,10 +282,10 @@ function buildSelector(queryParams) {
     if (queryParams.hasOperator(OPERATOR_LIST)) {
     if (queryParams.hasOperator(OPERATOR_LIST)) {
       const queryLists = [];
       const queryLists = [];
       queryParams.getPredicates(OPERATOR_LIST).forEach(query => {
       queryParams.getPredicates(OPERATOR_LIST).forEach(query => {
-        const lists = Lists.find({
+        const lists = ReactiveCache.getLists({
           title: new RegExp(escapeForRegex(query), 'i'),
           title: new RegExp(escapeForRegex(query), 'i'),
         });
         });
-        if (lists.count()) {
+        if (lists.length) {
           lists.forEach(list => {
           lists.forEach(list => {
             queryLists.push(list._id);
             queryLists.push(list._id);
           });
           });