Cleaning old data from artists indexes

This commit is contained in:
Deluan
2016-03-26 22:29:26 -04:00
parent 107321219a
commit 0e20910061
3 changed files with 11 additions and 0 deletions
+9
View File
@@ -37,4 +37,13 @@ func (r *artistIndexRepository) GetAll() (domain.ArtistIndexes, error) {
return indices, err
}
func (r *artistIndexRepository) DeleteAll() error {
var empty domain.ArtistIndexes
_, err := r.purgeInactive(empty, func(e interface{}) string {
return e.(domain.ArtistIndex).Id
})
return err
}
var _ domain.ArtistIndexRepository = (*artistIndexRepository)(nil)