HEAVY: finish music service migration, tidy up services, more tests
This commit is contained in:
parent
9e311df462
commit
90a671982c
47 changed files with 2698 additions and 902 deletions
|
|
@ -22,7 +22,7 @@ func MusicHandler(app *app.AppState) http.Handler {
|
|||
return
|
||||
}
|
||||
|
||||
release, err := controller.GetRelease(app.DB, r.URL.Path[1:], true)
|
||||
release, err := app.MusicService.GetFullReleaseByID(r.URL.Path[1:])
|
||||
if err != nil {
|
||||
http.NotFound(w, r)
|
||||
return
|
||||
|
|
@ -36,7 +36,7 @@ func MusicHandler(app *app.AppState) http.Handler {
|
|||
|
||||
func ServeCatalog(app *app.AppState) http.Handler {
|
||||
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
releases, err := controller.GetAllReleases(app.DB, true, 0, true)
|
||||
releases, err := app.MusicService.GetAllFullReleases(true, 0)
|
||||
if err != nil {
|
||||
fmt.Printf("WARN: Failed to pull releases for catalog: %s\n", err)
|
||||
http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue