This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"butterfliu/internal/model"
|
||||
"butterfliu/internal/repository"
|
||||
)
|
||||
|
||||
@@ -21,10 +22,10 @@ func (s *SongService) GetAllWithDetails() ([]repository.SongDetail, error) {
|
||||
}
|
||||
|
||||
// GetMediaFilePath returns the file path of a song by its song ID.
|
||||
func (s *SongService) GetMediaFile(id int) (repository.MediaFile, error) {
|
||||
func (s *SongService) GetMediaFile(id int) (model.MediaFile, error) {
|
||||
song, err := s.songRepo.Get(id)
|
||||
if err != nil {
|
||||
return repository.MediaFile{}, err
|
||||
return model.MediaFile{}, err
|
||||
}
|
||||
return s.mediaRepo.Get(song.MediaFileID)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user