mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-06 05:57:35 +03:00
Get() methods from all repositories now return a ErrNotFound when the id is nonexistent
This commit is contained in:
parent
db34122faf
commit
c90a50827a
11 changed files with 70 additions and 42 deletions
|
@ -46,8 +46,10 @@ func (m *MockMediaFile) Get(id string) (*domain.MediaFile, error) {
|
|||
if m.err {
|
||||
return nil, errors.New("Error!")
|
||||
}
|
||||
mf := m.data[id]
|
||||
return mf, nil
|
||||
if d, ok := m.data[id]; ok {
|
||||
return d, nil
|
||||
}
|
||||
return nil, domain.ErrNotFound
|
||||
}
|
||||
|
||||
func (m *MockMediaFile) FindByAlbum(artistId string) (*domain.MediaFiles, error) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue