Просмотр исходного кода

fix result.createdPage to createdPage

zahmis 5 лет назад
Родитель
Сommit
9ad2bfab83
1 измененных файлов с 4 добавлено и 4 удалено
  1. 4 4
      src/server/routes/apiv3/pages.js

+ 4 - 4
src/server/routes/apiv3/pages.js

@@ -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);