diff --git a/pkg/srv/cache.go b/pkg/srv/cache.go index 69d191b..8a5d4a7 100644 --- a/pkg/srv/cache.go +++ b/pkg/srv/cache.go @@ -63,7 +63,7 @@ func (cs *CacheServer) ServeHTTP(w http.ResponseWriter, r *http.Request) { h := w.Header() if option == "v" { h.Set(csp, videoCSP) - err = video.Execute(w, r.URL.Path) + err = video.Execute(w, data{Paths: dirContents{Base: r.URL.Path}}) if err != nil { http.Error(w, err.Error(), http.StatusInternalServerError) } @@ -94,7 +94,7 @@ func (cs *CacheServer) ServeHTTP(w http.ResponseWriter, r *http.Request) { h.Set(csp, indexCSP) w.WriteHeader(i.Status()) - err = cache.Execute(w, paths) + err = cache.Execute(w, data{Paths: paths}) if err != nil { http.Error(w, err.Error(), http.StatusInternalServerError) return diff --git a/pkg/srv/templates/cache.html b/pkg/srv/templates/cache.html index d8408a3..7b5dca7 100644 --- a/pkg/srv/templates/cache.html +++ b/pkg/srv/templates/cache.html @@ -6,14 +6,14 @@