mirror of
https://github.com/adnanh/webhook.git
synced 2025-05-13 09:04:44 +00:00
fix
This commit is contained in:
parent
6c6f353c88
commit
a4ce24550c
1 changed files with 1 additions and 3 deletions
|
@ -65,14 +65,12 @@ func rootHandler() string {
|
||||||
}
|
}
|
||||||
|
|
||||||
func hookHandler(req *http.Request, params martini.Params) 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" {
|
if req.Header.Get("Content-Type") == "application/json" {
|
||||||
decoder := json.NewDecoder(req.Body)
|
decoder := json.NewDecoder(req.Body)
|
||||||
decoder.UseNumber()
|
decoder.UseNumber()
|
||||||
|
|
||||||
p = make(map[string]interface{})
|
|
||||||
|
|
||||||
err := decoder.Decode(&p)
|
err := decoder.Decode(&p)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Add table
Reference in a new issue