Ver Fonte

userGroup -> userGroups

Shun Miyazawa há 1 ano atrás
pai
commit
5b48f97860
1 ficheiros alterados com 2 adições e 2 exclusões
  1. 2 2
      apps/app/src/server/models/page.ts

+ 2 - 2
apps/app/src/server/models/page.ts

@@ -675,7 +675,7 @@ schema.statics.findByPathAndViewer = async function(
 schema.statics.descendantCountByPaths = async function(
     paths: string[],
     user: IUserHasId,
-    userGroup = null,
+    userGroups = null,
     includeEmpty = false,
     includeAnyoneWithTheLink = false,
 ): Promise<IPagePathWithDescendantCount[]> {
@@ -686,7 +686,7 @@ schema.statics.descendantCountByPaths = async function(
   const baseQuery = this.find({ path: { $in: paths } });
   const queryBuilder = new PageQueryBuilder(baseQuery, includeEmpty);
 
-  await queryBuilder.addViewerCondition(user, userGroup, includeAnyoneWithTheLink);
+  await queryBuilder.addViewerCondition(user, userGroups, includeAnyoneWithTheLink);
 
   const conditions = queryBuilder.query._conditions;