|
|
@@ -65,24 +65,6 @@ class PageOperationService {
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
- async injectShouldFixPath(pages: any) {
|
|
|
- const filter = { actionType: PageActionType.Rename };
|
|
|
- const pageOperations = await PageOperation.find(filter);
|
|
|
-
|
|
|
- const _pageOperationIds = pageOperations.map(op => op.page._id.toString());
|
|
|
- const pageOperationIds = Array.from(new Set(_pageOperationIds)); // remove duplicate ids
|
|
|
-
|
|
|
- for (const pageOperationId of pageOperationIds) {
|
|
|
- for (const page of pages) {
|
|
|
- const pageId = page._id.toString();
|
|
|
- if (pageOperationId === pageId) {
|
|
|
- page.shouldFixPath = true;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
}
|
|
|
|
|
|
export default PageOperationService;
|