From 529a1b48d9609f842f9d95c2c52095204c220137 Mon Sep 17 00:00:00 2001 From: evilsocket Date: Tue, 26 Mar 2019 17:04:59 +0100 Subject: [PATCH] new: api.rest now exposes polled_at time field for the object session --- session/session_json.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/session/session_json.go b/session/session_json.go index 84bfe3db..fa3537e7 100644 --- a/session/session_json.go +++ b/session/session_json.go @@ -51,6 +51,7 @@ type sessionJSON struct { HID *network.HID `json:"hid"` Queue *packets.Queue `json:"packets"` StartedAt time.Time `json:"started_at"` + PolledAt time.Time `json:"polled_at"` Active bool `json:"active"` GPS GPS `json:"gps"` Modules ModuleList `json:"modules"` @@ -74,6 +75,7 @@ func (s *Session) MarshalJSON() ([]byte, error) { HID: s.HID, Queue: s.Queue, StartedAt: s.StartedAt, + PolledAt: time.Now(), Active: s.Active, GPS: s.GPS, Modules: s.Modules,