|
|
@@ -1157,6 +1157,7 @@ module.exports = function(crowi) {
|
|
|
const Bookmark = crowi.model('Bookmark');
|
|
|
const Attachment = crowi.model('Attachment');
|
|
|
const Comment = crowi.model('Comment');
|
|
|
+ const PageTagRelation = crowi.model('PageTagRelation');
|
|
|
const Revision = crowi.model('Revision');
|
|
|
const pageId = pageData._id;
|
|
|
const socketClientId = options.socketClientId || null;
|
|
|
@@ -1166,6 +1167,7 @@ module.exports = function(crowi) {
|
|
|
await Bookmark.removeBookmarksByPageId(pageId);
|
|
|
await Attachment.removeAttachmentsByPageId(pageId);
|
|
|
await Comment.removeCommentsByPageId(pageId);
|
|
|
+ await PageTagRelation.findOneAndRemove({ relatedPage: pageId });
|
|
|
await Revision.removeRevisionsByPath(pageData.path);
|
|
|
await this.findByIdAndRemove(pageId);
|
|
|
await this.removeRedirectOriginPageByPath(pageData.path);
|