Chart type json , tab order : GWM
This commit is contained in:
parent
59de2e648e
commit
bbe9e2db9c
20
main.go
20
main.go
@ -624,7 +624,7 @@ func main() {
|
|||||||
if record.GetString("is_chart") == "false" {
|
if record.GetString("is_chart") == "false" {
|
||||||
|
|
||||||
// Extract `card_type` JSON from `record.Get("card_type")`
|
// Extract `card_type` JSON from `record.Get("card_type")`
|
||||||
requestData := record.Get("card_type")
|
requestData := record.Get("card_type_json")
|
||||||
requestJSON, err := json.Marshal(requestData) // Convert interface{} to JSON string
|
requestJSON, err := json.Marshal(requestData) // Convert interface{} to JSON string
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println("Error encoding request data:", err)
|
fmt.Println("Error encoding request data:", err)
|
||||||
@ -663,16 +663,18 @@ func main() {
|
|||||||
"is_chart": record.GetString("is_chart"),
|
"is_chart": record.GetString("is_chart"),
|
||||||
"chart_type": record.GetString("chart_type"),
|
"chart_type": record.GetString("chart_type"),
|
||||||
// "response": record.GetString("is_chart") = true cRes : cardResults,
|
// "response": record.GetString("is_chart") = true cRes : cardResults,
|
||||||
"group_by": record.GetString("group_by"),
|
"group_by": record.GetString("group_by"),
|
||||||
"chart_heading": record.GetString(chartHeadingKey),
|
"chart_heading": record.GetString(chartHeadingKey),
|
||||||
"tab_heading": record.GetString(tabHeadingKey),
|
"tab_heading": record.GetString(tabHeadingKey),
|
||||||
"unset_value": record.Get("unset_value"),
|
"unset_value": record.Get("unset_value"),
|
||||||
"card_logo": logoURL,
|
"card_logo": logoURL,
|
||||||
"order_id": record.Get("order_id"),
|
"order_id": record.Get("order_id"),
|
||||||
"card_type": record.Get("card_type"),
|
"card_type_json": record.Get("card_type_json"),
|
||||||
|
"tab_order": record.GetString("tab_order"),
|
||||||
|
"chart_type_json": record.Get("chart_type_json"),
|
||||||
}
|
}
|
||||||
if record.GetString("is_chart") == "true" {
|
if record.GetString("is_chart") == "true" {
|
||||||
recordResult["response"] = cRes
|
recordResult["response"] = cResRaw
|
||||||
} else {
|
} else {
|
||||||
recordResult["response"] = cardResults
|
recordResult["response"] = cardResults
|
||||||
}
|
}
|
||||||
|
|||||||
BIN
pb_data/data.db
BIN
pb_data/data.db
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
pb_data/logs.db
BIN
pb_data/logs.db
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user