itizawa %!s(int64=6) %!d(string=hai) anos
pai
achega
b403fc1cf7

+ 6 - 1
src/client/js/services/AdminNotificationContainer.js

@@ -84,7 +84,12 @@ export default class AdminNotificationContainer extends Container {
    * @memberOf SlackAppConfiguration
    */
   async addNotificationPattern(pathPattern, channel) {
-    // TODO GW-802 create apiV3 addNotificationPattern
+    const response = await this.appContainer.apiv3.post('/notification-setting/user-notification', {
+      pathPattern,
+      channel,
+    });
+
+    return response;
   }
 
 }

+ 5 - 0
src/server/routes/apiv3/notification-setting.js

@@ -97,6 +97,11 @@ module.exports = (crowi) => {
 
   });
 
+  // TODO swagger & validator
+  router.post('/user-notification', loginRequiredStrictly, adminRequired, csrf, validator.userNotification, ApiV3FormValidator, async(req, res) => {
+    return res.apiv3({ });
+  });
+
 
   return router;
 };