Forgot to fix the response slices allocation...
This commit is contained in:
parent
25d902c9d7
commit
1da0f7d412
1 changed files with 2 additions and 2 deletions
|
|
@ -71,7 +71,7 @@ func (s search) SearchArtist(q string, offset int, size int) (*Results, error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, nil
|
return nil, nil
|
||||||
}
|
}
|
||||||
res := make(Results, len(resp))
|
res := make(Results, 0, len(resp))
|
||||||
for _, id := range resp {
|
for _, id := range resp {
|
||||||
a, err := s.artistRepo.Get(id)
|
a, err := s.artistRepo.Get(id)
|
||||||
if criticalError("Artist", id, err) {
|
if criticalError("Artist", id, err) {
|
||||||
|
|
@ -92,7 +92,7 @@ func (s search) SearchAlbum(q string, offset int, size int) (*Results, error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, nil
|
return nil, nil
|
||||||
}
|
}
|
||||||
res := make(Results, len(resp))
|
res := make(Results, 0, len(resp))
|
||||||
for _, id := range resp {
|
for _, id := range resp {
|
||||||
al, err := s.albumRepo.Get(id)
|
al, err := s.albumRepo.Get(id)
|
||||||
if criticalError("Album", id, err) {
|
if criticalError("Album", id, err) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue