Skip to content
Snippets Groups Projects
Commit 55edd463 authored by Hans Kristian Hoel's avatar Hans Kristian Hoel
Browse files

created ServiceHandler for webhooks

parent c6a9ea4d
No related branches found
No related tags found
No related merge requests found
...@@ -34,3 +34,14 @@ func WebhookHandeler(w http.ResponseWriter, r *http.Request) { ...@@ -34,3 +34,14 @@ func WebhookHandeler(w http.ResponseWriter, r *http.Request) {
} }
} }
func ServiceHandler(w http.ResponseWriter, r *http.Request) {
switch r.Method {
case MethodPost:
fmt.Println("Recive POST request")
for _, v := range webhooks {
go CallUrl(v.URL, "Resonse on registered event in webhook demo: "+v.Event)
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment