this is immensely broken but i swear i'll fix it later

This commit is contained in:
ari melody 2025-01-20 10:34:39 +00:00
parent e2ec731109
commit d5f1fcb5e0
Signed by: ari
GPG key ID: CF99829C92678188
28 changed files with 409 additions and 253 deletions

View file

@ -12,7 +12,7 @@ import (
"arimelody-web/admin"
"arimelody-web/api"
"arimelody-web/global"
musicView "arimelody-web/music/view"
"arimelody-web/view"
"arimelody-web/templates"
"github.com/jmoiron/sqlx"
@ -49,7 +49,7 @@ func createServeMux() *http.ServeMux {
mux.Handle("/admin/", http.StripPrefix("/admin", admin.Handler()))
mux.Handle("/api/", http.StripPrefix("/api", api.Handler()))
mux.Handle("/music/", http.StripPrefix("/music", musicView.Handler()))
mux.Handle("/music/", http.StripPrefix("/music", view.MusicHandler()))
mux.Handle("/uploads/", http.StripPrefix("/uploads", staticHandler("uploads")))
mux.Handle("/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
if r.URL.Path == "/" || r.URL.Path == "/index.html" {