diff options
author | Steve Manuel <nilslice@gmail.com> | 2016-11-04 10:42:13 -0700 |
---|---|---|
committer | Steve Manuel <nilslice@gmail.com> | 2016-11-04 10:42:13 -0700 |
commit | 8fa5d8ff0b1531e7956e5be9277eecdc145022f4 (patch) | |
tree | 1451525bdc48b4d78226d78b44d589640c20f83b /system/api/analytics/init.go | |
parent | 3a32a54582bb6bb62fce24fe8d1091afa68a0324 (diff) |
fixing index to be correct value for day threshold
Diffstat (limited to 'system/api/analytics/init.go')
-rw-r--r-- | system/api/analytics/init.go | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/system/api/analytics/init.go b/system/api/analytics/init.go index b013459..ccca7b9 100644 --- a/system/api/analytics/init.go +++ b/system/api/analytics/init.go @@ -4,7 +4,6 @@ package analytics import ( - "fmt" "log" "net/http" "strings" @@ -127,9 +126,6 @@ func Week() (map[string]interface{}, error) { dates[len(times)-1-i] = day.Format("01/02") } - fmt.Println(times) - fmt.Println(dates) - // get api request analytics from db var requests = []apiRequest{} err := store.View(func(tx *bolt.Tx) error { @@ -173,7 +169,7 @@ CHECK_REQUEST: // if on today, there will be no next iteration to set values for // day prior so all valid requests belong to today if j == len(times) { - if ts.After(times[j-1]) || ts.Equal(times[j]) { + if ts.After(times[j]) || ts.Equal(times[j]) { // do all record keeping total[j]++ |