@@ -88,9 +88,9 @@ func parseWebhookRequest(req *http.Request) (*Webhook, string, error) {
88
88
func processWebhook (c Connector , conf executeConfiguration ) {
89
89
err := ExecuteScript (c , conf )
90
90
if err != nil {
91
- fmt .Printf ("%s Error %s" , time .Now ().Format (time .RFC3339 ), err )
91
+ fmt .Printf ("%s Error %s\n " , time .Now ().Format (time .RFC3339 ), err )
92
92
}
93
- fmt .Printf ("%s Success" , time .Now ().Format (time .RFC3339 ))
93
+ fmt .Printf ("%s Success\n " , time .Now ().Format (time .RFC3339 ))
94
94
}
95
95
96
96
// WebhookHandler handles a HTTP POST request containing the webhook payload in its body
@@ -99,7 +99,7 @@ func (a *API) WebhookHandler(w http.ResponseWriter, req *http.Request) {
99
99
if ! strings .EqualFold (req .Method , "POST" ) {
100
100
w .WriteHeader (http .StatusMethodNotAllowed )
101
101
fmt .Fprint (w , "Error 405 - Method not allowed: invalid method: " , req .Method )
102
- fmt .Printf ("%s Error 405 - Method not allowed: invalid method: %s" , time .Now ().Format (time .RFC3339 ), req .Method )
102
+ fmt .Printf ("%s Error 405 - Method not allowed: invalid method: %s\n " , time .Now ().Format (time .RFC3339 ), req .Method )
103
103
return
104
104
}
105
105
@@ -108,7 +108,7 @@ func (a *API) WebhookHandler(w http.ResponseWriter, req *http.Request) {
108
108
if err != nil {
109
109
w .WriteHeader (http .StatusNotFound )
110
110
fmt .Fprint (w , "Error 404 - Not found: " , err )
111
- fmt .Printf ("%s Error %s" , time .Now ().Format (time .RFC3339 ), err )
111
+ fmt .Printf ("%s Error %s\n " , time .Now ().Format (time .RFC3339 ), err )
112
112
return
113
113
}
114
114
@@ -117,7 +117,7 @@ func (a *API) WebhookHandler(w http.ResponseWriter, req *http.Request) {
117
117
if err != nil {
118
118
w .WriteHeader (http .StatusNotFound )
119
119
fmt .Fprint (w , "Error 404 - Not found: " , err )
120
- fmt .Printf ("%s Error %s" , time .Now ().Format (time .RFC3339 ), err )
120
+ fmt .Printf ("%s Error %s\n " , time .Now ().Format (time .RFC3339 ), err )
121
121
return
122
122
}
123
123
@@ -127,7 +127,7 @@ func (a *API) WebhookHandler(w http.ResponseWriter, req *http.Request) {
127
127
if err != nil {
128
128
w .WriteHeader (http .StatusNotFound )
129
129
fmt .Fprint (w , "Error 404 - Not found: " , err )
130
- fmt .Printf ("%s Error %s" , time .Now ().Format (time .RFC3339 ), err )
130
+ fmt .Printf ("%s Error %s\n " , time .Now ().Format (time .RFC3339 ), err )
131
131
return
132
132
}
133
133
@@ -137,7 +137,7 @@ func (a *API) WebhookHandler(w http.ResponseWriter, req *http.Request) {
137
137
if err != nil {
138
138
w .WriteHeader (http .StatusNotFound )
139
139
fmt .Fprint (w , "Error 404 - Not found: " , err )
140
- fmt .Printf ("%s Error %s" , time .Now ().Format (time .RFC3339 ), err )
140
+ fmt .Printf ("%s Error %s\n " , time .Now ().Format (time .RFC3339 ), err )
141
141
return
142
142
}
143
143
@@ -146,7 +146,7 @@ func (a *API) WebhookHandler(w http.ResponseWriter, req *http.Request) {
146
146
if err != nil {
147
147
w .WriteHeader (http .StatusNotFound )
148
148
fmt .Fprint (w , "Error 404 - Not found: " , err )
149
- fmt .Printf ("%s Error %s" , time .Now ().Format (time .RFC3339 ), err )
149
+ fmt .Printf ("%s Error %s\n " , time .Now ().Format (time .RFC3339 ), err )
150
150
return
151
151
}
152
152
@@ -178,6 +178,6 @@ func (a *API) WebhookHandler(w http.ResponseWriter, req *http.Request) {
178
178
// Succes
179
179
w .WriteHeader (http .StatusOK )
180
180
fmt .Fprint (w , "Payload delivered successfully" )
181
- fmt .Printf ("%s Payload delivered successfully" , time .Now ().Format (time .RFC3339 ))
181
+ fmt .Printf ("%s Payload delivered successfully\n " , time .Now ().Format (time .RFC3339 ))
182
182
return
183
183
}
0 commit comments