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

empty page operation collection

yohei0125 пре 4 година
родитељ
комит
00cd88cf02

+ 1 - 0
packages/app/src/server/crowi/index.js

@@ -682,6 +682,7 @@ Crowi.prototype.setupPageService = async function() {
   }
   }
   if (this.pageOperationService == null) {
   if (this.pageOperationService == null) {
     this.pageOperationService = new PageOperationService(this);
     this.pageOperationService = new PageOperationService(this);
+    await this.pageOperationService.initPageOperation();
   }
   }
 };
 };
 
 

+ 3 - 2
packages/app/src/server/service/page-operation.ts

@@ -10,9 +10,10 @@ class PageOperationService {
 
 
   constructor(crowi) {
   constructor(crowi) {
     this.crowi = crowi;
     this.crowi = crowi;
+  }
 
 
-    // TODO: Remove this code when resuming feature is implemented
-    PageOperation.deleteMany({});
+  async initPageOperation():Promise<void> {
+    await PageOperation.deleteMany({});
   }
   }
 
 
   /**
   /**