Return genres in search3 endpoint.

This commit is contained in:
Caio Cotts 2023-11-21 21:11:45 -05:00 committed by Deluan Quintão
parent bb7186ce2f
commit f69c27d146
3 changed files with 12 additions and 4 deletions

View file

@ -154,6 +154,10 @@ func (r *albumRepository) purgeEmpty() error {
func (r *albumRepository) Search(q string, offset int, size int) (model.Albums, error) {
results := model.Albums{}
err := r.doSearch(q, offset, size, &results, "name")
if err != nil {
return nil, err
}
err = r.loadAlbumGenres(&results)
return results, err
}