Ver Fonte

add syncDescendants

itizawa há 5 anos atrás
pai
commit
2a9ee423f5
1 ficheiros alterados com 4 adições e 1 exclusões
  1. 4 1
      src/server/service/page.js

+ 4 - 1
src/server/service/page.js

@@ -313,6 +313,7 @@ class PageService {
     });
     });
 
 
     const duplicateDescendants = this.duplicateDescendants.bind(this);
     const duplicateDescendants = this.duplicateDescendants.bind(this);
+    const pageEvent = this.pageEvent;
     let count = 0;
     let count = 0;
     const writeStream = new Writable({
     const writeStream = new Writable({
       objectMode: true,
       objectMode: true,
@@ -330,7 +331,9 @@ class PageService {
       },
       },
       final(callback) {
       final(callback) {
         logger.debug(`Adding pages has completed: (totalCount=${count})`);
         logger.debug(`Adding pages has completed: (totalCount=${count})`);
-
+        // update  path
+        page.path = newPagePath;
+        pageEvent.emit('syncDescendants', page, user);
         callback();
         callback();
       },
       },
     });
     });