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

🚀 Feature: add GET songs endpoint #6

Open
1 task done
darren2hang opened this issue Feb 7, 2023 · 1 comment · May be fixed by #18
Open
1 task done

🚀 Feature: add GET songs endpoint #6

darren2hang opened this issue Feb 7, 2023 · 1 comment · May be fixed by #18
Assignees
Labels
good first issue Good for newcomers

Comments

@darren2hang
Copy link
Contributor

darren2hang commented Feb 7, 2023

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:

[
  {
    name: 'Never gonna give you up',
    id: '0jRtIxbK0KxaSlJW13ZOp',
    artists: [ 'Rick Astley'],
  },
  {
    name: 'STAY (with Justin Bieber)',
    id: 'R3W0jRkwqbK0KxaKWnJA43ZYm',
    artists: [
      'The Kid LAROI',
      'Justin Bieber',
    ], ...
]
  • 👋 I may be able to implement this feature request

This is a 🚀 Feature Request

@darren2hang darren2hang added the good first issue Good for newcomers label Feb 7, 2023
@aparnahrn
Copy link

I'll take this one!

@aparnahrn aparnahrn linked a pull request May 17, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants