Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor API response type for search #70

Open
Noam-Bendelac opened this issue Dec 29, 2020 · 1 comment
Open

Refactor API response type for search #70

Noam-Bendelac opened this issue Dec 29, 2020 · 1 comment
Labels
backend Backend functionality frontend Frontend functionality
Milestone

Comments

@Noam-Bendelac
Copy link
Collaborator

Similar to what I did for the /api/playlists/:id endpoint and its response type in f5b375c and 044bd2e, I need to have better control over what data is forwarded from the Spotify API and decide exactly what parts are needed. This will help with state management in the frontend and mocking track data for the add state.

@Noam-Bendelac Noam-Bendelac added backend Backend functionality frontend Frontend functionality labels Dec 29, 2020
@Noam-Bendelac
Copy link
Collaborator Author

This should include basing the GetTrackSearchResponse type on an array of TrackObjectFull (from TrackSearchResponse['tracks']['items']) instead of the broad SearchResponse type.

@Noam-Bendelac Noam-Bendelac added this to the Milestone 1 milestone Dec 29, 2020
Noam-Bendelac added a commit that referenced this issue May 23, 2021
Refactor api types for track search and tracks within
`.../playlists/:id` to have just the data needed by the frontend, and
move some of the processing from the frontend in several places to the
backend in one place.

These were done together so the draft addition track's data can be
mocked in `SearchResults.tsx` `addButtonOnClick` callback. This will now
allow spotify data on removed tracks to be saved when they are removed
for #87.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Backend functionality frontend Frontend functionality
Projects
None yet
Development

No branches or pull requests

1 participant