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

Fix summary merging.

Rename some methods.
Use pointers for structs and none for primitives.
This commit is contained in:
Ferdinand Mütsch
2019-10-11 08:00:02 +02:00
parent 3696622493
commit 37b02ff32c
7 changed files with 123 additions and 122 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.CreateSummary(from, to, user) // 'to' is always constant
summary, err = h.SummarySrvc.Construct(from, to, user) // 'to' is always constant
if err != nil {
w.WriteHeader(http.StatusInternalServerError)
return