add debug code for live feed. JSON data is different.
This commit is contained in:
parent
1dce4a6701
commit
a7129a964b
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user