Open darren2hang opened 1 year ago
Endpoint to be used to retrieve all the songs in the songs collection. Return the song name, id, and a list of the names of the artists
Set this as the GET endpoint at the route /song
Make a new route /song and make it in a new file @aurgy/server/www/song.ts
@aurgy/server/www/song.ts
Use the Song.all() function to get all the songs and then filter the result to only return the data we want
We want to return an array of song objects that only contain the name, id, and a list of the artists.
It would look something like:
[ { name: 'Never gonna give you up', id: '0jRtIxbK0KxaSlJW13ZOp', artists: [ 'Rick Astley'], }, { name: 'STAY (with Justin Bieber)', id: 'R3W0jRkwqbK0KxaKWnJA43ZYm', artists: [ 'The Kid LAROI', 'Justin Bieber', ], ... ]
This is a :rocket: Feature Request
I'll take this one!
Endpoint to be used to retrieve all the songs in the songs collection. Return the song name, id, and a list of the names of the artists
Use Case
Set this as the GET endpoint at the route /song
Proposed Solution
Make a new route /song and make it in a new file
@aurgy/server/www/song.ts
Use the Song.all() function to get all the songs and then filter the result to only return the data we want
We want to return an array of song objects that only contain the name, id, and a list of the artists.
It would look something like:
This is a :rocket: Feature Request