Better reply method.

This commit is contained in:
K. Isom 2021-04-19 13:20:27 -07:00
parent 5cb1acb279
commit f9a19b2f80
1 changed files with 1 additions and 6 deletions

View File

@ -36,15 +36,10 @@ func handler(w http.ResponseWriter, r *http.Request) {
return return
} }
w.Write([]byte("accepted"))
response, err := cps.Handle(context.Background(), message.Body) response, err := cps.Handle(context.Background(), message.Body)
if err != nil { if err != nil {
log.Printf("twilio receive hook: %s", err) log.Printf("twilio receive hook: %s", err)
} }
err = Send(message.Source, response.String()) w.Write([]byte(response.String()))
if err != nil {
log.Printf("twilio receive hook: %s", err)
}
} }