diff options
author | Steve Manuel <nilslice@gmail.com> | 2016-11-03 23:21:28 -0700 |
---|---|---|
committer | Steve Manuel <nilslice@gmail.com> | 2016-11-03 23:21:28 -0700 |
commit | d0504bb75a72aaa1e0112db6e8eedf0d938d8f3b (patch) | |
tree | b418dbb972661ac5c7528582c0d26005f089ea94 /system/api/analytics/init.go | |
parent | 0668a23961d5df06ee981d70ecb2fbf5f3fcdb07 (diff) |
Week should return map[string]string and cast bytes to string for template iterpolation
Diffstat (limited to 'system/api/analytics/init.go')
-rw-r--r-- | system/api/analytics/init.go | 10 |
1 files changed, 5 insertions, 5 deletions
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 } |