完善接口
All checks were successful
Go CI / test-and-build (push) Successful in 11s

This commit is contained in:
2026-04-07 20:49:15 +08:00
parent 064ea6c674
commit f57e777580
4 changed files with 81 additions and 3 deletions

View File

@@ -56,12 +56,15 @@ func main() {
r.Route("/api/artists", func(r chi.Router) {
r.Get("/", libraryController.GetArtists)
r.Get("/{id}", libraryController.GetArtist)
r.Get("/{id}", libraryController.GetArtist)
r.Get("/{id}/songs", libraryController.GetSongsByArtist)
r.Get("/{id}/albums", libraryController.GetAlbumsByArtist)
})
r.Route("/api/albums", func(r chi.Router) {
r.Get("/", libraryController.GetAlbums)
r.Get("/{id}", libraryController.GetAlbum)
r.Get("/{id}/cover", libraryController.GetAlbumCover)
r.Get("/{id}/songs", libraryController.GetSongsByAlbum)
})