From 6bab9dcbaabc3b666e99f12bf8f997f5e862f05a Mon Sep 17 00:00:00 2001 From: Soam Vasani Date: Sat, 1 Jun 2019 19:10:44 -0700 Subject: [PATCH] Analytics bugfix (#1195) --- pkg/router/analytics.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/router/analytics.go b/pkg/router/analytics.go index 9c28ed47..76c4a1cf 100644 --- a/pkg/router/analytics.go +++ b/pkg/router/analytics.go @@ -17,7 +17,7 @@ type ( url string } AnalyticsData struct { - id string + ID string `json:"ID"` FunctionCallCount uint64 `json:"FunctionCallCount"` } ) @@ -49,14 +49,14 @@ func (a *Analytics) run() { ticker := time.NewTicker(24 * time.Hour) for range ticker.C { msg := a.gatherData() - msg.id = a.id + msg.ID = a.id msgbytes, err := json.Marshal(*msg) if err != nil { continue } - resp, err := http.Post(a.url, "application/json", bytes.NewReader(msgbytes)) + resp, _ := http.Post(a.url, "application/json", bytes.NewReader(msgbytes)) if resp != nil { // close response body to prevent resources leak resp.Body.Close()