move models, views, and controllers to root
This commit is contained in:
parent
f0d29126ab
commit
96cc64464f
21 changed files with 190 additions and 203 deletions
4
main.go
4
main.go
|
@ -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" {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue