1
0
mirror of https://github.com/muety/wakapi.git synced 2023-08-10 21:12:56 +03:00

fix: all time data model

This commit is contained in:
Ferdinand Mütsch
2020-09-06 17:20:37 +02:00
parent 7c8ea86d4e
commit 84e9559860
3 changed files with 10 additions and 4 deletions

View File

@ -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)