Closed Gullinkambi-Whip closed 3 years ago
Can you try logging const song = await Client.songs.get(Number(id));
and const lyric = await song.lyrics();
? Seems like its working for me right now.
I was able to get the lyrics by rewriting the code as follows. It doesn't seem to be a bug.
- return res.status(200).json(lyric);
+ return res.status(200).json({lyric: lyric});
Aight, closing this. Happy Coding!
I apologize for this very rudimentary question.
Could you please tell me how to get the lyrics of a single song from the ID?
I am trying to display a list of songs from the keywords entered by the user, and then display the lyrics of the song the user selects from the list.
The API is as follows.
getSongsAPI
I was able to get a list of lyrics with the above API.
For each of the list of returned songs, we have planted a click event as shown below.
getLyricAPI
The
getLyricAPI
expects to return lyrics, but it returns an array as shown in the image below.