yohei0125 4 лет назад
Родитель
Сommit
d72ef1a729
1 измененных файлов с 4 добавлено и 6 удалено
  1. 4 6
      packages/app/src/server/service/page.ts

+ 4 - 6
packages/app/src/server/service/page.ts

@@ -572,13 +572,11 @@ class PageService {
     if (pageOp == null || pageOp.toPath == null) throw Error('PageRenameOperation is not executable');
     if (pageOp == null || pageOp.toPath == null) throw Error('PageRenameOperation is not executable');
 
 
     pageOp.actionStage = PageActionStage.Main; // to restart from the beginning
     pageOp.actionStage = PageActionStage.Main; // to restart from the beginning
-    const page = pageOp.page;
-    const newPagePath = pageOp.toPath;
-    const user = pageOp.user;
-    const options = pageOp.options;
-    const pageOpId = pageOp._id;
+    const {
+      page, toPath, user, options, _id,
+    } = pageOp;
 
 
-    await this.renameMainOperation(page, newPagePath, user, options, pageOpId);
+    await this.renameMainOperation(page, toPath, user, options, _id);
   }
   }
 
 
   private isRenamingToUnderTarget(fromPath: string, toPath: string): boolean {
   private isRenamingToUnderTarget(fromPath: string, toPath: string): boolean {