diff options
author | Steve Manuel <nilslice@gmail.com> | 2016-12-12 21:14:41 -0800 |
---|---|---|
committer | Steve Manuel <nilslice@gmail.com> | 2016-12-12 21:14:41 -0800 |
commit | 92e01ee742f1f8e073fbc18b153e2adf65516cad (patch) | |
tree | 2ac124dab07941b44e507c9ee52c0a8b66bc5781 /system/api/analytics/init.go | |
parent | 0c1c118ae3e42c92cf9d47e41903a8c256019935 (diff) |
using dates as range for metrics put
Diffstat (limited to 'system/api/analytics/init.go')
-rw-r--r-- | system/api/analytics/init.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/system/api/analytics/init.go b/system/api/analytics/init.go index 1bd5507..e883e3b 100644 --- a/system/api/analytics/init.go +++ b/system/api/analytics/init.go @@ -273,7 +273,7 @@ CHECK_REQUEST: err = store.Update(func(tx *bolt.Tx) error { b := tx.Bucket([]byte("__metrics")) - for i := range metrics { + for i := range dates { if total[i] == 0 { total[i] = metrics[i].Total } @@ -282,7 +282,7 @@ CHECK_REQUEST: unique[i] = metrics[i].Unique } - k := metrics[i].Date + k := dates[i] if b.Get([]byte(k)) == nil { v, err := json.Marshal(metrics[i]) if err != nil { |