very rough updates to admin pages, reduced reliance on global.DB
This commit is contained in:
parent
ae254dd731
commit
7044f7344b
15 changed files with 192 additions and 106 deletions
6
main.go
6
main.go
|
@ -341,9 +341,9 @@ func main() {
|
|||
func createServeMux() *http.ServeMux {
|
||||
mux := http.NewServeMux()
|
||||
|
||||
mux.Handle("/admin/", http.StripPrefix("/admin", admin.Handler()))
|
||||
mux.Handle("/api/", http.StripPrefix("/api", api.Handler()))
|
||||
mux.Handle("/music/", http.StripPrefix("/music", view.MusicHandler()))
|
||||
mux.Handle("/admin/", http.StripPrefix("/admin", admin.Handler(global.DB)))
|
||||
mux.Handle("/api/", http.StripPrefix("/api", api.Handler(global.DB)))
|
||||
mux.Handle("/music/", http.StripPrefix("/music", view.MusicHandler(global.DB)))
|
||||
mux.Handle("/uploads/", http.StripPrefix("/uploads", staticHandler(filepath.Join(global.Config.DataDirectory, "uploads"))))
|
||||
mux.Handle("/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
if r.Method == http.MethodHead {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue