Skip to content

πŸš€ Feature: add GET songs endpointΒ #6

@darren2hang

Description

@darren2hang

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions