itizawa před 5 roky
rodič
revize
121bfb145b
1 změnil soubory, kde provedl 7 přidání a 9 odebrání
  1. 7 9
      src/server/routes/apiv3/pages.js

+ 7 - 9
src/server/routes/apiv3/pages.js

@@ -406,16 +406,14 @@ module.exports = (crowi) => {
 
 
     const result = { page: pageService.serializeToObj(page) };
     const result = { page: pageService.serializeToObj(page) };
 
 
-    if (globalNotificationService != null) {
-      try {
+    try {
       // global notification
       // global notification
-        await globalNotificationService.fire(GlobalNotificationSetting.EVENT.PAGE_MOVE, page, req.user, {
-          oldPath: req.body.path,
-        });
-      }
-      catch (err) {
-        logger.error('Move notification failed', err);
-      }
+      await globalNotificationService.fire(GlobalNotificationSetting.EVENT.PAGE_MOVE, page, req.user, {
+        oldPath: req.body.path,
+      });
+    }
+    catch (err) {
+      logger.error('Move notification failed', err);
     }
     }
 
 
     return res.apiv3(result);
     return res.apiv3(result);