From d0504bb75a72aaa1e0112db6e8eedf0d938d8f3b Mon Sep 17 00:00:00 2001 From: Steve Manuel Date: Thu, 3 Nov 2016 23:21:28 -0700 Subject: Week should return map[string]string and cast bytes to string for template iterpolation --- system/api/analytics/init.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'system/api/analytics/init.go') diff --git a/system/api/analytics/init.go b/system/api/analytics/init.go index d050d9d..41767f1 100644 --- a/system/api/analytics/init.go +++ b/system/api/analytics/init.go @@ -109,7 +109,7 @@ func serve() { } // Week returns the map containing decoded javascript needed to chart a week of data by day -func Week() (map[string]interface{}, error) { +func Week() (map[string]string, error) { // set thresholds for today and the 6 days preceeding times := [7]time.Time{} now := time.Now() @@ -222,9 +222,9 @@ CHECK_REQUEST: return nil, err } - return map[string]interface{}{ - "dates": jsDates, - "unique": jsUnique, - "total": jsTotal, + return map[string]string{ + "dates": string(jsDates), + "unique": string(jsUnique), + "total": string(jsTotal), }, nil } -- cgit v1.2.3