|
@@ -687,13 +687,6 @@ class PageService {
|
|
|
);
|
|
);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- if (isRecursively) {
|
|
|
|
|
- (async() => {
|
|
|
|
|
- const descendantCountAppliedToAncestors = await this.duplicateDescendantsWithStream(page, newPagePath, user, shouldUseV4Process);
|
|
|
|
|
- await this.updateDescendantCountOfAncestors(createdPage._id, descendantCountAppliedToAncestors, false);
|
|
|
|
|
- })();
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
// take over tags
|
|
// take over tags
|
|
|
const originTags = await page.findRelatedTagsById();
|
|
const originTags = await page.findRelatedTagsById();
|
|
|
let savedTags = [];
|
|
let savedTags = [];
|
|
@@ -708,7 +701,10 @@ class PageService {
|
|
|
|
|
|
|
|
// TODO: resume
|
|
// TODO: resume
|
|
|
if (isRecursively) {
|
|
if (isRecursively) {
|
|
|
- this.duplicateDescendantsWithStream(page, newPagePath, user, shouldUseV4Process);
|
|
|
|
|
|
|
+ (async() => {
|
|
|
|
|
+ const descendantCountAppliedToAncestors = await this.duplicateDescendantsWithStream(page, newPagePath, user, shouldUseV4Process);
|
|
|
|
|
+ await this.updateDescendantCountOfAncestors(createdPage._id, descendantCountAppliedToAncestors, false);
|
|
|
|
|
+ })();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
return result;
|
|
return result;
|