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

This commit is contained in:
2026-04-07 16:38:59 +08:00
parent 02efb9972a
commit 9aec254f23
4 changed files with 67 additions and 4 deletions

View File

@@ -71,10 +71,18 @@ func (s *LibraryService) GetArtists() ([]model.Artist, error) {
return s.repo.GetArtists()
}
func (s *LibraryService) GetArtist(id int) (model.Artist, error) {
return s.repo.GetArtist(id)
}
func (s *LibraryService) GetAlbums() ([]model.Album, error) {
return s.repo.GetAlbums()
}
func (s *LibraryService) GetAlbum(id int) (model.Album, error) {
return s.repo.GetAlbum(id)
}
func (s *LibraryService) Scan(id int) (*ScanReport, error) {
lib, err := s.repo.GetByID(id)
if err != nil {