Skip to content

Commit

Permalink
fix(common/adapters/tracks): adapting TrackArtist
Browse files Browse the repository at this point in the history
  • Loading branch information
Mnigos committed Nov 22, 2023
1 parent f2cc6b6 commit 2862dc2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/common/adapters/tracks.adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ export const adaptTrack = ({
id,
name,
album: { name: album.name, images: album.images },
artists: artists.map(({ name, id, href }) => ({ name, id, href })),
artists: artists.map(({ name, id, external_urls: { spotify: href } }) => ({
name,
id,
href,
})),
href,
duration: duration_ms,
...(progress_ms && { progress: progress_ms }),
Expand Down
2 changes: 1 addition & 1 deletion src/common/mocks/track.mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export const formattedTrackMock: FormattedTrack = {
},
artists: [
{
href: 'https://api.spotify.com/v1/artists/2rcnAZ6DvORQ365X3zVYpr',
href: 'https://open.spotify.com/artist/2rcnAZ6DvORQ365X3zVYpr',
id: '2rcnAZ6DvORQ365X3zVYpr',
name: 'Biosphere',
},
Expand Down

0 comments on commit 2862dc2

Please sign in to comment.