Default interval.

This commit is contained in:
Ferdinand Mütsch 2020-02-20 15:54:20 +01:00
parent 89b52778ef
commit f69b55b1f9
1 changed files with 6 additions and 0 deletions

View File

@ -78,6 +78,12 @@ func (h *SummaryHandler) Index(w http.ResponseWriter, r *http.Request) {
h.loadTemplates()
}
q := r.URL.Query()
if q.Get("interval") == "" && q.Get("from") == "" {
q.Set("interval", "today")
r.URL.RawQuery = q.Encode()
}
summary, err, status := loadUserSummary(r, h.SummarySrvc)
if err != nil {
w.WriteHeader(status)