This commit is contained in:
Adnan Hajdarevic 2015-01-13 01:49:49 +01:00
parent 6c6f353c88
commit a4ce24550c

View file

@ -65,14 +65,12 @@ func rootHandler() string {
}
func hookHandler(req *http.Request, params martini.Params) string {
var p map[string]interface{}
p := make(map[string]interface{})
if req.Header.Get("Content-Type") == "application/json" {
decoder := json.NewDecoder(req.Body)
decoder.UseNumber()
p = make(map[string]interface{})
err := decoder.Decode(&p)
if err != nil {