Add shared folder icon

This commit is contained in:
2023-04-19 00:04:06 +02:00
parent 971a0fe539
commit 5803a30b6b
4 changed files with 15 additions and 3 deletions

View File

@@ -23,6 +23,8 @@ func (wc *WebController) serveDirectory(w http.ResponseWriter, r *http.Request,
if err != nil {
if err.Error() == "not_found" || err.Error() == "path_not_found" {
wc.templates.Get().ExecuteTemplate(w, "404", td)
} else if err.Error() == "authentication_required" {
http.Redirect(w, r, "/login", http.StatusSeeOther)
} else {
log.Error("Failed to get path: %s", err)
wc.templates.Get().ExecuteTemplate(w, "500", td)