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

Unstable. Still need to fix summary item times to not be all the same.

This commit is contained in:
Ferdinand Mütsch
2019-10-10 18:32:17 +02:00
parent b8122ce530
commit 3696622493
4 changed files with 16 additions and 9 deletions

View File

@ -76,7 +76,7 @@ func (h *SummaryHandler) Get(w http.ResponseWriter, r *http.Request) {
cacheKey := getHash([]time.Time{from, to}, user)
if cachedSummary, ok := h.Cache.Get(cacheKey); !ok {
// Cache Miss
summary, err = h.SummarySrvc.GetSummary(from, to, user) // 'to' is always constant
summary, err = h.SummarySrvc.CreateSummary(from, to, user) // 'to' is always constant
if err != nil {
w.WriteHeader(http.StatusInternalServerError)
return