mirror of
https://github.com/muety/wakapi.git
synced 2023-08-10 21:12:56 +03:00
Merge branch 'master' of git.muetsch.io:n1try/wakapi
This commit is contained in:
@ -2,6 +2,7 @@ package routes
|
||||
|
||||
import (
|
||||
"crypto/md5"
|
||||
"log"
|
||||
"net/http"
|
||||
"strconv"
|
||||
"time"
|
||||
@ -44,6 +45,13 @@ func (h *SummaryHandler) Get(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
user := r.Context().Value(models.UserKey).(*models.User)
|
||||
|
||||
// Initialize aliases for user
|
||||
if !h.SummarySrvc.AliasService.IsInitialized(user.ID) {
|
||||
log.Printf("Initializing aliases for user '%s'\n", user.ID)
|
||||
h.SummarySrvc.AliasService.InitUser(user.ID)
|
||||
}
|
||||
|
||||
params := r.URL.Query()
|
||||
interval := params.Get("interval")
|
||||
from, err := utils.ParseDate(params.Get("from"))
|
||||
|
Reference in New Issue
Block a user