mirror of
https://github.com/navidrome/navidrome.git
synced 2026-08-31 07:30:32 +00:00
refactor: simplify return statements
Signed-off-by: Deluan <deluan@navidrome.org>
This commit is contained in:
parent
b3ecaddd9c
commit
b7ea480576
@ -123,8 +123,7 @@ func (r *shareRepositoryWrapper) Save(entity any) (string, error) {
|
||||
|
||||
s.Contents = str.TruncateRunes(s.Contents, 30, "...")
|
||||
|
||||
id, err = r.Persistable.Save(s)
|
||||
return id, err
|
||||
return r.Persistable.Save(s)
|
||||
}
|
||||
|
||||
func (r *shareRepositoryWrapper) Update(id string, entity any, _ ...string) error {
|
||||
|
||||
@ -205,8 +205,7 @@ func (m *MockArtistRepo) Search(q string, options ...model.QueryOptions) (model.
|
||||
return nil, errors.New("unexpected error")
|
||||
}
|
||||
// Simple mock implementation - just return all artists for testing
|
||||
allArtists, err := m.GetAll()
|
||||
return allArtists, err
|
||||
return m.GetAll()
|
||||
}
|
||||
|
||||
var _ model.ArtistRepository = (*MockArtistRepo)(nil)
|
||||
|
||||
@ -319,8 +319,7 @@ func (m *MockMediaFileRepo) Search(q string, options ...model.QueryOptions) (mod
|
||||
return nil, errors.New("unexpected error")
|
||||
}
|
||||
// Simple mock implementation - just return all media files for testing
|
||||
allFiles, err := m.GetAll()
|
||||
return allFiles, err
|
||||
return m.GetAll()
|
||||
}
|
||||
|
||||
// Cross-library move detection mock methods
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user