Permalink
Browse files

Fix nil check in webhook

  • Loading branch information...
biilmann committed Dec 1, 2017
1 parent a0f5c7b commit 3ff4bafc3f84c7d8bc30eebc03d867e26cf1a5f8
Showing with 1 addition and 1 deletion.
  1. +1 −1 api/hooks.go
View
@@ -193,7 +193,7 @@ func triggerHook(event HookEvent, user *models.User, instanceID string, config *
body.Close()
}
}()
if err != nil && body != nil {
if err == nil && body != nil {
webhookRsp := &WebhookResponse{}
decoder := json.NewDecoder(body)
if err = decoder.Decode(webhookRsp); err != nil {

0 comments on commit 3ff4baf

Please sign in to comment.