소스 검색

replace apiV3

itizawa 6 년 전
부모
커밋
2f8d423f52
1개의 변경된 파일1개의 추가작업 그리고 3개의 파일을 삭제
  1. 1 3
      src/server/routes/apiv3/notification-setting.js

+ 1 - 3
src/server/routes/apiv3/notification-setting.js

@@ -212,9 +212,7 @@ module.exports = (crowi) => {
         notification.slackChannels = slackChannels;
         break;
       default:
-        logger.error('GlobalNotificationSetting Type Error: undefined type');
-        req.flash('errorMessage', 'Error occurred in creating a new global notification setting: undefined notification type');
-        return res.redirect('/admin/notification#global-notification');
+        return res.apiv3Err(new ErrorV3('Error occurred in creating a new global notification setting: undefined notification type'));
     }
 
     notification.triggerPath = triggerPath;