
module.exports = function(robot)  {
  robot.router.post('/hubot/github-hooks', function(req, res) {
    var data = null;

    if(req.body) {
      try {
        data = JSON.parse(req.body);
      } 
      catch(e) {
        robot.logger.error("Invalid JSON submitted to Slack message callback");
        //res.send(422)
        res.send('You supplied invalid JSON to this endpoint.');
        return;
      }
    } 
    else {
      robot.logger.error("Non-JSON submitted to Slack message callback");
      //res.send(422)
      res.send('You supplied invalid JSON to this endpoint.');
      return;
    }


  });
}

@@ -264,38 +264,35 @@
 tted to 
-Slack message callback
+/hubot/github-hooks
 %22);%0A    
@@ -334,32 +334,35 @@
 d('You supplied 
+an 
 invalid JSON to 
@@ -473,30 +473,28 @@
  to 
-Slack message callback
+ /hubot/github-hooks
 %22);%0A
@@ -544,16 +544,19 @@
 upplied 
+an 
 invalid 

update slack-msg0callback