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/playlists endpoint #74

Closed
Noam-Bendelac opened this issue Jan 9, 2021 · 1 comment · Fixed by #76
Closed

Refactor /api/playlists endpoint #74

Noam-Bendelac opened this issue Jan 9, 2021 · 1 comment · Fixed by #76
Labels
backend Backend functionality frontend Frontend functionality
Milestone

Comments

@Noam-Bendelac
Copy link
Collaborator

As in #58, only respond with playlists the user has access to. Refine the api response type defined in apiTypes.ts to enumerate the forwarded Spotify response fields and include needed db fields. Use that api response type in the frontend instead of SpotifyApi.PlaylistObjectSimplified[] and do appropriate changes. Decide on a good way to request Spotify playlists (request all? or an array of individual playlist promises?) and consolidate those with db playlists.

@Noam-Bendelac Noam-Bendelac added backend Backend functionality frontend Frontend functionality labels Jan 9, 2021
@Noam-Bendelac Noam-Bendelac added this to the Milestone 1 milestone Jan 9, 2021
@Noam-Bendelac
Copy link
Collaborator Author

Seems like only id, users, name, and image are currently relevant fields. Owner is no longer relevant because the Spotify owner will always be the owner account, and the db doesn't keep track of an owner, just the users array. Need to decide if users array should contain ids or display names; I think I should use display names, after I implement a display name cache in the backend (#38). There will possibly be more relevant fields in the future.

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

Successfully merging a pull request may close this issue.

1 participant