18 lines
412 B
Go
18 lines
412 B
Go
package music
|
|
|
|
import (
|
|
"arimelody-web/model"
|
|
"net/http"
|
|
)
|
|
|
|
func Handler(app *model.AppState) http.Handler {
|
|
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
mux := http.NewServeMux()
|
|
|
|
mux.Handle("/releases/", serveReleases(app))
|
|
mux.Handle("/artists/", serveArtists(app))
|
|
mux.Handle("/tracks/", serveTracks(app))
|
|
|
|
mux.ServeHTTP(w, r)
|
|
})
|
|
}
|