mirror of https://github.com/muety/wakapi.git
Default interval.
This commit is contained in:
parent
89b52778ef
commit
f69b55b1f9
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue