Remove debugging code
This commit is contained in:
@@ -1,9 +1,7 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"strings"
|
||||
)
|
||||
@@ -39,13 +37,10 @@ func telegramIsCommand(message string, command string) bool {
|
||||
}
|
||||
|
||||
func webHandlerTelegramBot(w http.ResponseWriter, r *http.Request) {
|
||||
bodyBuffer, _ := ioutil.ReadAll(r.Body)
|
||||
println(string(bodyBuffer))
|
||||
|
||||
// Parse only needed fields of incoming JSON body
|
||||
var err error
|
||||
var request tgWebhookRequest
|
||||
err = json.NewDecoder(bytes.NewReader(bodyBuffer)).Decode(&request)
|
||||
err = json.NewDecoder(r.Body).Decode(&request)
|
||||
if err != nil {
|
||||
println(err.Error())
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user