Skip to content

Commit

Permalink
fix(albumsapi.ts): fix 'getAlbums'
Browse files Browse the repository at this point in the history
Fix 'getAlbums' by joining the string array with commas.
  • Loading branch information
adamgrieger committed Jun 20, 2020
1 parent a30baa1 commit d0f917c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/apis/AlbumsApi.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ describe('AlbumsApi', () => {
expect(response).toEqual(getAlbumsFixture.albums);
expect(httpMock.get).toBeCalledWith('/albums', {
params: {
ids: ['foo', 'bar'],
ids: 'foo,bar',
},
});
});
Expand All @@ -78,7 +78,7 @@ describe('AlbumsApi', () => {
expect(response).toEqual(getAlbumsFixture.albums);
expect(httpMock.get).toBeCalledWith('/albums', {
params: {
ids: ['foo', 'bar'],
ids: 'foo,bar',
market: 'baz',
},
});
Expand Down
2 changes: 1 addition & 1 deletion src/apis/AlbumsApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export class AlbumsApi {
const response = await this.http.get<GetAlbumsResponse>('/albums', {
params: {
...options,
ids: albumIds,
ids: albumIds.join(','),
},
});
return response.albums;
Expand Down

0 comments on commit d0f917c

Please sign in to comment.