Преглед изворни кода

rm addConditionToListByPathsArrayWithGlob method

Shun Miyazawa пре 1 година
родитељ
комит
93c382a97b
1 измењених фајлова са 0 додато и 21 уклоњено
  1. 0 21
      apps/app/src/server/models/page.ts

+ 0 - 21
apps/app/src/server/models/page.ts

@@ -568,27 +568,6 @@ export class PageQueryBuilder {
     return this;
     return this;
   }
   }
 
 
-  addConditionToListByPathsArrayWithGlob(paths: string[]): PageQueryBuilder {
-    const conditions: Array<{ path: string | RegExp;}> = paths.map((path) => {
-      if (path.endsWith('/*')) {
-        const basePathWithoutGlob = path.slice(0, -2); // remove '/*'
-        const pathWithTrailingSlash = addTrailingSlash(basePathWithoutGlob);
-        const startsPattern = escapeStringRegexp(pathWithTrailingSlash);
-
-        return { path: new RegExp(`^${startsPattern}`) };
-      }
-
-      return { path: normalizePath(path) };
-    });
-
-    this.query = this.query
-      .and({
-        $or: conditions,
-      });
-
-    return this;
-  }
-
 }
 }
 
 
 schema.statics.createEmptyPage = async function(
 schema.statics.createEmptyPage = async function(