Add files page
This commit is contained in:
@@ -68,7 +68,7 @@ func (s *Server) routes() http.Handler {
|
||||
mux := http.NewServeMux()
|
||||
mux.HandleFunc("GET /{$}", s.handleIndex)
|
||||
mux.HandleFunc("POST /upload", s.handleUpload)
|
||||
mux.HandleFunc("GET /admin", s.handleAdmin)
|
||||
mux.HandleFunc("GET /files", s.handleFiles)
|
||||
mux.HandleFunc("GET /d/{id}", s.handleDownload)
|
||||
mux.HandleFunc("GET /i/{id}", s.handleInfo)
|
||||
mux.HandleFunc("POST /d/{id}/delete", s.handleDelete)
|
||||
@@ -199,7 +199,7 @@ func bearer(r *http.Request) string {
|
||||
// --- rendering -----------------------------------------------------------
|
||||
|
||||
var pageNames = []string{"index.html", "result.html", "info.html", "error.html",
|
||||
"admin.html", "login.html"}
|
||||
"files.html", "login.html"}
|
||||
|
||||
// parsePages pairs each page with the shared layout. They cannot all be parsed
|
||||
// into one template set because every page defines "content".
|
||||
|
||||
Reference in New Issue
Block a user