Explorar o código

add addConditionToExistPaths

takeru0001 %!s(int64=5) %!d(string=hai) anos
pai
achega
b4a966c71a
Modificáronse 1 ficheiros con 11 adicións e 0 borrados
  1. 11 0
      src/server/models/page.js

+ 11 - 0
src/server/models/page.js

@@ -258,6 +258,17 @@ class PageQueryBuilder {
     return this;
   }
 
+  addConditionToArrayExistPaths(paths) {
+    this.query = this.query
+      .and({
+        path: {
+          $in: paths,
+        },
+      });
+
+    return this;
+  }
+
   populateDataToList(userPublicFields) {
     this.query = this.query
       .populate({