fix(server): don't override /song routes

Signed-off-by: Deluan <deluan@navidrome.org>
This commit is contained in:
Deluan
2025-06-01 14:34:45 -04:00
parent f5aac7af0d
commit 9c4af3c6d0
6 changed files with 529 additions and 11 deletions
+2 -5
View File
@@ -144,11 +144,8 @@ func (n *Router) addPlaylistTrackRoute(r chi.Router) {
}
func (n *Router) addSongPlaylistsRoute(r chi.Router) {
r.Route("/song/{id}", func(r chi.Router) {
r.Use(server.URLParamsMiddleware)
r.Get("/playlists", func(w http.ResponseWriter, r *http.Request) {
getSongPlaylists(n.ds)(w, r)
})
r.With(server.URLParamsMiddleware).Get("/song/{id}/playlists", func(w http.ResponseWriter, r *http.Request) {
getSongPlaylists(n.ds)(w, r)
})
}