Forgot to fix the response slices allocation...
This commit is contained in:
+2
-2
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user