Comparing version 1.1.1 to 1.1.2
@@ -7,13 +7,5 @@ var express = require('express') | ||
app.post('/', function(req, res) { | ||
try { | ||
var payload = JSON.parse(req.body.payload) | ||
, event = req.header('x-github-event') | ||
console.log('Received event', event, payload) | ||
app.emit(event, payload) | ||
res.send('OK') | ||
} catch(e) { | ||
console.error(e) | ||
req.status(422).send('Malformed payload') | ||
} | ||
var event = req.header('x-github-event') | ||
app.emit(event, req.body) | ||
res.send('OK') | ||
}) | ||
@@ -20,0 +12,0 @@ |
{ | ||
"name": "octopie", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "An easy way to add GitHub hooks to your project", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
6564
154