Refactored purgeInactive, better test suite setup

This commit is contained in:
Deluan
2020-01-10 19:20:29 -05:00
committed by Deluan Quintão
parent ef79f6342f
commit 9ccd9545e8
7 changed files with 47 additions and 48 deletions
+2 -7
View File
@@ -93,13 +93,8 @@ func (r *albumRepository) GetAllIds() ([]string, error) {
return result, nil
}
func (r *albumRepository) PurgeInactive(active domain.Albums) ([]string, error) {
activeIDs := make([]string, len(active))
for i, album := range active {
activeIDs[i] = album.ID
}
return r.purgeInactive(activeIDs)
func (r *albumRepository) PurgeInactive(activeList domain.Albums) ([]string, error) {
return r.purgeInactive(activeList)
}
func (r *albumRepository) GetStarred(options domain.QueryOptions) (domain.Albums, error) {