this is immensely broken but i swear i'll fix it later
This commit is contained in:
parent
e2ec731109
commit
d5f1fcb5e0
28 changed files with 409 additions and 253 deletions
|
@ -6,15 +6,15 @@ import (
|
|||
"strings"
|
||||
|
||||
"arimelody-web/global"
|
||||
"arimelody-web/music/model"
|
||||
"arimelody-web/music/controller"
|
||||
"arimelody-web/model"
|
||||
"arimelody-web/controller"
|
||||
)
|
||||
|
||||
func serveArtist() http.Handler {
|
||||
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
slices := strings.Split(r.URL.Path[1:], "/")
|
||||
id := slices[0]
|
||||
artist, err := music.GetArtist(global.DB, id)
|
||||
artist, err := controller.GetArtist(global.DB, id)
|
||||
if err != nil {
|
||||
if artist == nil {
|
||||
http.NotFound(w, r)
|
||||
|
@ -25,7 +25,7 @@ func serveArtist() http.Handler {
|
|||
return
|
||||
}
|
||||
|
||||
credits, err := music.GetArtistCredits(global.DB, artist.ID, true)
|
||||
credits, err := controller.GetArtistCredits(global.DB, artist.ID, true)
|
||||
if err != nil {
|
||||
fmt.Printf("Error rendering admin track page for %s: %s\n", id, err)
|
||||
http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue