From 3a897e4db97cc6f5e47f395662499402eb4c2bda Mon Sep 17 00:00:00 2001 From: Steve Date: Tue, 24 Jan 2017 10:35:18 -0800 Subject: [core] System backups (uploads, system.db, analytics.db) (#42) --- system/api/analytics/init.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'system/api/analytics/init.go') diff --git a/system/api/analytics/init.go b/system/api/analytics/init.go index 3eccc13..f24425b 100644 --- a/system/api/analytics/init.go +++ b/system/api/analytics/init.go @@ -43,13 +43,15 @@ const RANGE = 14 func Record(req *http.Request) { external := strings.Contains(req.URL.Path, "/external/") + ts := int64(time.Nanosecond) * time.Now().UnixNano() / int64(time.Millisecond) + r := apiRequest{ URL: req.URL.String(), Method: req.Method, Origin: req.Header.Get("Origin"), Proto: req.Proto, RemoteAddr: req.RemoteAddr, - Timestamp: time.Now().Unix() * 1000, + Timestamp: ts, External: external, } -- cgit v1.2.3