|
@@ -1163,6 +1163,7 @@ module.exports = function(crowi) {
|
|
|
const Attachment = crowi.model('Attachment');
|
|
const Attachment = crowi.model('Attachment');
|
|
|
const Comment = crowi.model('Comment');
|
|
const Comment = crowi.model('Comment');
|
|
|
const PageTagRelation = crowi.model('PageTagRelation');
|
|
const PageTagRelation = crowi.model('PageTagRelation');
|
|
|
|
|
+ const ShareLink = crowi.model('ShareLink');
|
|
|
const Revision = crowi.model('Revision');
|
|
const Revision = crowi.model('Revision');
|
|
|
const pageId = pageData._id;
|
|
const pageId = pageData._id;
|
|
|
const socketClientId = options.socketClientId || null;
|
|
const socketClientId = options.socketClientId || null;
|
|
@@ -1173,6 +1174,7 @@ module.exports = function(crowi) {
|
|
|
await Attachment.removeAttachmentsByPageId(pageId);
|
|
await Attachment.removeAttachmentsByPageId(pageId);
|
|
|
await Comment.removeCommentsByPageId(pageId);
|
|
await Comment.removeCommentsByPageId(pageId);
|
|
|
await PageTagRelation.remove({ relatedPage: pageId });
|
|
await PageTagRelation.remove({ relatedPage: pageId });
|
|
|
|
|
+ await ShareLink.remove({ relatedPage: pageId });
|
|
|
await Revision.removeRevisionsByPath(pageData.path);
|
|
await Revision.removeRevisionsByPath(pageData.path);
|
|
|
await this.findByIdAndRemove(pageId);
|
|
await this.findByIdAndRemove(pageId);
|
|
|
await this.removeRedirectOriginPageByPath(pageData.path);
|
|
await this.removeRedirectOriginPageByPath(pageData.path);
|