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

Minor code cleanup.

This commit is contained in:
Ferdinand Mütsch
2019-11-07 23:11:19 +01:00
parent 121b8c9885
commit fe1cc3ac88
7 changed files with 21 additions and 21 deletions

View File

@ -62,13 +62,13 @@ func (h *SummaryHandler) Get(w http.ResponseWriter, r *http.Request) {
from = utils.StartOfYear()
default:
w.WriteHeader(http.StatusBadRequest)
w.Write([]byte("Missing 'from' parameter"))
w.Write([]byte("missing 'from' parameter"))
return
}
}
live := (params.Get("live") != "" && params.Get("live") != "false") || interval == IntervalToday
recompute := (params.Get("recompute") != "" && params.Get("recompute") != "false")
recompute := params.Get("recompute") != "" && params.Get("recompute") != "false"
to := utils.StartOfDay()
if live {
to = time.Now()