Add realtime stats for filesystem

This commit is contained in:
2023-05-19 21:45:42 +02:00
parent 98c725f291
commit 794a38da19
8 changed files with 133 additions and 7 deletions

View File

@@ -25,7 +25,11 @@ func (wc *WebController) serveDirectory(w http.ResponseWriter, r *http.Request,
node, err := td.PixelAPI.GetFilesystemPath(path)
if err != nil {
if err.Error() == "not_found" || err.Error() == "path_not_found" {
wc.templates.Get().ExecuteTemplate(w, "404", td)
wc.serveNotFound(w, r)
return
} else if err.Error() == "forbidden" {
wc.serveForbidden(w, r)
return
} else if err.Error() == "authentication_required" {
http.Redirect(w, r, "/login", http.StatusSeeOther)
} else {