Browse Source

update method

takeru0001 5 năm trước cách đây
mục cha
commit
a800b72b6d
1 tập tin đã thay đổi với 3 bổ sung1 xóa
  1. 3 1
      src/server/service/search-delegator/elasticsearch.js

+ 3 - 1
src/server/service/search-delegator/elasticsearch.js

@@ -354,7 +354,9 @@ class ElasticsearchDelegator {
 
   updateOrInsertDescendantsPagesById(page, user) {
     const Page = mongoose.model('Page');
-    return this.updateOrInsertPages(() => Page.findManageableListWithDescendants(page, user));
+    const { PageQueryBuilder } = Page;
+    const findQuery = new PageQueryBuilder(Page.find()).addConditionToListWithDescendants(page.path).query;
+    return this.updateOrInsertPages(() => findQuery);
   }
 
   /**