move models, views, and controllers to root

This commit is contained in:
ari melody 2024-11-01 19:33:26 +00:00
parent f0d29126ab
commit 96cc64464f
Signed by: ari
GPG key ID: CF99829C92678188
21 changed files with 190 additions and 203 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" {