feat: initial commit

This commit is contained in:
2025-06-15 16:44:44 +02:00
parent c50d1858f2
commit 21b334bc70
27 changed files with 13550 additions and 122 deletions

View File

@ -13,6 +13,7 @@ type Handler struct {
store *store.Store
playInterval time.Duration
playPeriod timex.PeriodType
playDelay time.Duration
}
// ServeHTTP implements http.Handler.
@ -20,12 +21,13 @@ func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
h.mux.ServeHTTP(w, r)
}
func NewHandler(store *store.Store, playInterval time.Duration, playPeriod timex.PeriodType) *Handler {
func NewHandler(store *store.Store, playInterval time.Duration, playPeriod timex.PeriodType, playDelay time.Duration) *Handler {
h := &Handler{
mux: http.NewServeMux(),
store: store,
playInterval: playInterval,
playPeriod: playPeriod,
playDelay: playDelay,
}
h.mux.HandleFunc("GET /", h.getQuizPage)