Make QueryOptions optional in AlbumRepository.GetAll

This commit is contained in:
Deluan
2020-01-11 21:25:37 -05:00
parent bfac3e3c91
commit d4ed6a0569
7 changed files with 26 additions and 18 deletions
+3 -3
View File
@@ -63,9 +63,9 @@ func (r *albumRepository) FindByArtist(artistId string) (domain.Albums, error) {
return r.toAlbums(albums)
}
func (r *albumRepository) GetAll(options domain.QueryOptions) (domain.Albums, error) {
func (r *albumRepository) GetAll(options ...domain.QueryOptions) (domain.Albums, error) {
var all []_Album
err := r.getAll(&all, &options)
err := r.getAll(&all, options...)
if err != nil {
return nil, err
}
@@ -82,7 +82,7 @@ func (r *albumRepository) toAlbums(all []_Album) (domain.Albums, error) {
func (r *albumRepository) GetAllIds() ([]string, error) {
var all []_Album
err := r.getAll(&all, &domain.QueryOptions{})
err := r.getAll(&all)
if err != nil {
return nil, err
}