From a7129a964b4b0d2db6a7d5012a113d4fa3b6cae7 Mon Sep 17 00:00:00 2001 From: eeckert Date: Wed, 20 Dec 2023 16:42:54 -0700 Subject: [PATCH] add debug code for live feed. JSON data is different. --- main/main.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main/main.go b/main/main.go index 1328ffd..8061989 100644 --- a/main/main.go +++ b/main/main.go @@ -115,6 +115,7 @@ func MPE_ValidateForward(in map[string]json.RawMessage) bool { func readDataStream(resp http.ResponseWriter, request *http.Request) { // reqBody, _ := io.ReadAll(request.Body) body_string, _ := io.ReadAll(request.Body) + fmt.Println(string(body_string)) // debug code to show JASON data coming in var request_body map[string]json.RawMessage err := json.Unmarshal(body_string, &request_body) if err != nil { @@ -126,6 +127,7 @@ func readDataStream(resp http.ResponseWriter, request *http.Request) { var MPE_ShouldFoward = MPE_ValidateForward(request_body) var MPE_ProjectNumber, MPE_ProjectName = MPE_IsProject(request_body) + // TODO: Fix - json: cannot unmarshal array into Go value of type map[string]json.RawMessage error. // TODO: Collect EventID, JSON Content, and return values into data object to be logged to screen. Validate data visually for a bit against "live" webhook data. fmt.Println(MPE_ShouldFoward, MPE_ProjectNumber, MPE_ProjectName) // TODO: Once Data validation / Struct is built, pass data off to next Webhook URL for processing.