diff --git a/bot/utils.go b/bot/utils.go index e01aff8..872231f 100644 --- a/bot/utils.go +++ b/bot/utils.go @@ -25,7 +25,8 @@ func initGitHubClient() { func listenForWebhook() { log.Println("Listening on :3333......") - http.HandleFunc("/", webhookHandler) + http.HandleFunc("/", new wr) + http.HandleFunc("/webhook", webhookHandler) err := http.ListenAndServe(":3333", nil) if err != nil { @@ -33,6 +34,10 @@ func listenForWebhook() { } } +func webHandle(w http.ResponseWriter, r *http.Request) { + fmt.Fprintf(w, "Turn back!") +} + func webhookHandler(w http.ResponseWriter, r *http.Request) { payload, err := github.ValidatePayload(r, nil) if err != nil {