|
|
@@ -228,13 +228,13 @@ module.exports = (crowi) => {
|
|
|
|
|
|
// update scopes for descendants
|
|
|
if (overwriteScopesOfDescendants) {
|
|
|
- Page.applyScopesToDescendantsAsyncronously(result.createdPage, req.user);
|
|
|
+ Page.applyScopesToDescendantsAsyncronously(createdPage, req.user);
|
|
|
}
|
|
|
|
|
|
// global notification
|
|
|
if (globalNotificationService != null) {
|
|
|
try {
|
|
|
- await globalNotificationService.fire(GlobalNotificationSetting.EVENT.PAGE_CREATE, result.createdPage, req.user);
|
|
|
+ await globalNotificationService.fire(GlobalNotificationSetting.EVENT.PAGE_CREATE, createdPage, req.user);
|
|
|
}
|
|
|
catch (err) {
|
|
|
logger.error('Create grobal notification failed', err);
|
|
|
@@ -244,7 +244,7 @@ module.exports = (crowi) => {
|
|
|
// user notification
|
|
|
if (isSlackEnabled && userNotificationService != null) {
|
|
|
try {
|
|
|
- const results = await userNotificationService.fire(result.createdPage, req.user, slackChannels, 'create', false);
|
|
|
+ const results = await userNotificationService.fire(createdPage, req.user, slackChannels, 'create', false);
|
|
|
results.forEach((result) => {
|
|
|
if (result.status === 'rejected') {
|
|
|
logger.error('Create user notification failed', result.reason);
|
|
|
@@ -510,7 +510,7 @@ module.exports = (crowi) => {
|
|
|
// global notification
|
|
|
if (globalNotificationService != null) {
|
|
|
try {
|
|
|
- await globalNotificationService.fire(GlobalNotificationSetting.EVENT.PAGE_CREATE, result.createdPage, req.user);
|
|
|
+ await globalNotificationService.fire(GlobalNotificationSetting.EVENT.PAGE_CREATE, createdPage, req.user);
|
|
|
}
|
|
|
catch (err) {
|
|
|
logger.error('Create grobal notification failed', err);
|