Browse Source

Removed unnecessary code

Taichi Masuyama 4 years ago
parent
commit
9062abb645
1 changed files with 1 additions and 3 deletions
  1. 1 3
      packages/app/src/server/models/page.ts

+ 1 - 3
packages/app/src/server/models/page.ts

@@ -864,7 +864,7 @@ schema.statics.takeOffFromTree = async function(pageId: ObjectIdLike) {
 };
 };
 
 
 schema.statics.removeEmptyPages = async function(pageIdsToNotRemove: ObjectIdLike[], paths: string[]): Promise<void> {
 schema.statics.removeEmptyPages = async function(pageIdsToNotRemove: ObjectIdLike[], paths: string[]): Promise<void> {
-  const result = await this.deleteMany({
+  await this.deleteMany({
     _id: {
     _id: {
       $nin: pageIdsToNotRemove,
       $nin: pageIdsToNotRemove,
     },
     },
@@ -873,8 +873,6 @@ schema.statics.removeEmptyPages = async function(pageIdsToNotRemove: ObjectIdLik
     },
     },
     isEmpty: true,
     isEmpty: true,
   });
   });
-
-  console.log('りさると', result);
 };
 };
 
 
 schema.statics.PageQueryBuilder = PageQueryBuilder as any; // mongoose does not support constructor type as statics attrs type
 schema.statics.PageQueryBuilder = PageQueryBuilder as any; // mongoose does not support constructor type as statics attrs type