Explorar el Código

Revert "temp: send message seccuess"

This reverts commit 5d8f1c5f7bec9043ebed91d3e55b50751d398fd9.
sou hace 7 años
padre
commit
6b63485a92
Se han modificado 2 ficheros con 1 adiciones y 25 borrados
  1. 1 3
      lib/routes/comment.js
  2. 0 22
      lib/routes/slack.js

+ 1 - 3
lib/routes/comment.js

@@ -5,7 +5,6 @@ module.exports = function(crowi, app) {
     , Comment = crowi.model('Comment')
     , Page = crowi.model('Page')
     , ApiResponse = require('../util/apiResponse')
-    , slack = require('./slack')
     , actions = {}
     , api = {};
 
@@ -74,8 +73,7 @@ module.exports = function(crowi, app) {
       lastUpdateUser: req.user,
       updatedAt: new Date()
     });
-    const s = new slack('adsf');
-    await s.send();
+
     return res.json(ApiResponse.success({comment: createdComment}));
   };
 

+ 0 - 22
lib/routes/slack.js

@@ -1,22 +0,0 @@
-module.exports = function(text) {
-  const slackFunc = {};
-  slackFunc.send = function(text) {
-    const Slack = require('slack-node');
-
-    const webhookUri = 'https://hooks.slack.com/services/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 ';
-
-    const slack = new Slack();
-    slack.setWebhook(webhookUri);
-
-    slack.webhook({
-      channel: '#general',
-      username: 'Growi',
-      text: '`comment uploaded`'
-    }, function(err, response) {
-      console.log(response);
-    });
-    console.log('i\'m in: text is: ', text);
-  };
-
-  return slackFunc;
-};