diff --git a/models/compat/v1/all_time.go b/models/compat/v1/all_time.go index 7afcd23..b903a32 100644 --- a/models/compat/v1/all_time.go +++ b/models/compat/v1/all_time.go @@ -3,6 +3,10 @@ package v1 // https://wakatime.com/developers#all_time_since_today type AllTimeVieModel struct { + Data *AllTimeVieModelData `json:"data"` +} + +type AllTimeVieModelData struct { Seconds float32 `json:"seconds"` // total number of seconds logged since account created Text string `json:"text"` // total time logged since account created as human readable string> IsUpToDate bool `json:"is_up_to_date"` // true if the stats are up to date; when false, a 202 response code is returned and stats will be refreshed soon> diff --git a/routes/compat/v1/all_time.go b/routes/compat/v1/all_time.go index 1cb4180..b4be03a 100644 --- a/routes/compat/v1/all_time.go +++ b/routes/compat/v1/all_time.go @@ -46,9 +46,11 @@ func (h *CompatV1AllHandler) ApiGet(w http.ResponseWriter, r *http.Request) { total := summary.TotalTime() vm := &v1.AllTimeVieModel{ - Seconds: float32(total), - Text: utils.FmtWakatimeDuration(total * time.Second), - IsUpToDate: true, + Data: &v1.AllTimeVieModelData{ + Seconds: float32(total), + Text: utils.FmtWakatimeDuration(total * time.Second), + IsUpToDate: true, + }, } utils.RespondJSON(w, http.StatusOK, vm) diff --git a/version.txt b/version.txt index abb1658..ee672d8 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.9.0 \ No newline at end of file +1.9.1 \ No newline at end of file