Feat(log): Additional logging on web-based route
All checks were successful
Webhook-Everything/Webhook-Everything/pipeline/head This commit looks good
All checks were successful
Webhook-Everything/Webhook-Everything/pipeline/head This commit looks good
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package webhookeverything
|
||||
|
||||
import (
|
||||
"log"
|
||||
"net/http"
|
||||
"net/http/httputil"
|
||||
)
|
||||
@@ -19,6 +20,9 @@ func (env *Env) forwardHookToTelegram(r *http.Request, routeID string) error {
|
||||
return err
|
||||
}
|
||||
|
||||
// Print on screent
|
||||
log.Println(responseStr)
|
||||
|
||||
// Send telegram
|
||||
env.TelegramEnv.TelegramSend(routeResult.TelegramShortCode, string(responseStr))
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package webhookeverything
|
||||
|
||||
import (
|
||||
"log"
|
||||
"net/http"
|
||||
|
||||
"git.samuelpua.com/telboon/webhook-everything/backend/internal/common"
|
||||
@@ -21,6 +22,7 @@ import (
|
||||
func (env *Env) handleWebhook(w http.ResponseWriter, r *http.Request) {
|
||||
ctx := r.Context()
|
||||
routeID := chi.URLParam(r, "routeID")
|
||||
log.Printf("Webhook received for routeID: %s", routeID)
|
||||
_ = ctx
|
||||
|
||||
err := env.forwardHookToTelegram(r, routeID)
|
||||
|
||||
Reference in New Issue
Block a user