|
@@ -1161,7 +1161,6 @@ 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 Revision = crowi.model('Revision');
|
|
const Revision = crowi.model('Revision');
|
|
|
- const PageGroupRelation = crowi.model('PageGroupRelation');
|
|
|
|
|
const pageId = pageData._id;
|
|
const pageId = pageData._id;
|
|
|
const socketClientId = options.socketClientId || null;
|
|
const socketClientId = options.socketClientId || null;
|
|
|
|
|
|
|
@@ -1173,7 +1172,6 @@ module.exports = function(crowi) {
|
|
|
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);
|
|
|
- await PageGroupRelation.removeAllByPage(pageData);
|
|
|
|
|
if (socketClientId != null) {
|
|
if (socketClientId != null) {
|
|
|
pageEvent.emit('delete', pageData, user, socketClientId); // update as renamed page
|
|
pageEvent.emit('delete', pageData, user, socketClientId); // update as renamed page
|
|
|
}
|
|
}
|