2
0
Эх сурвалжийг харах

remove rename pageOperation

yohei0125 4 жил өмнө
parent
commit
7058f812f6

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

@@ -1,6 +1,6 @@
 import { pagePathUtils } from '@growi/core';
 import { pagePathUtils } from '@growi/core';
 
 
-import PageOperation from '~/server/models/page-operation';
+import PageOperation, { PageActionType } from '~/server/models/page-operation';
 
 
 const { isEitherOfPathAreaOverlap, isPathAreaOverlap, isTrashPage } = pagePathUtils;
 const { isEitherOfPathAreaOverlap, isPathAreaOverlap, isTrashPage } = pagePathUtils;
 
 
@@ -14,7 +14,7 @@ class PageOperationService {
 
 
   // TODO: Remove this code when resuming feature is implemented
   // TODO: Remove this code when resuming feature is implemented
   async init():Promise<void> {
   async init():Promise<void> {
-    await PageOperation.deleteMany({});
+    await PageOperation.deleteMany({ actionType: { $ne: PageActionType.Rename } });
   }
   }
 
 
   /**
   /**