mirror of
https://github.com/muety/wakapi.git
synced 2023-08-10 21:12:56 +03:00
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()
|
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)
|
summary, err, status := loadUserSummary(r, h.SummarySrvc)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
w.WriteHeader(status)
|
w.WriteHeader(status)
|
||||||
|
Loading…
Reference in New Issue
Block a user