This commit is contained in:
Adnan Hajdarevic
2015-06-06 14:28:00 +02:00
parent cbe2440cda
commit 9977fa8c61
2 changed files with 8 additions and 8 deletions
+4 -4
View File
@@ -189,12 +189,12 @@ func hookHandler(w http.ResponseWriter, r *http.Request) {
if h.TriggerRule == nil || h.TriggerRule != nil && h.TriggerRule.Evaluate(&headers, &query, &payload, &body) {
log.Printf("%s hook triggered successfully\n", h.ID)
if !h.CaptureCommandOutput {
go handleHook(h, &headers, &query, &payload, &body)
fmt.Fprintf(w, h.ResponseMessage)
} else {
if h.CaptureCommandOutput {
response := handleHook(h, &headers, &query, &payload, &body)
fmt.Fprintf(w, response)
} else {
go handleHook(h, &headers, &query, &payload, &body)
fmt.Fprintf(w, h.ResponseMessage)
}
return