Open keanemind opened 5 years ago
At the top of the index.js
file, check arguments for a code from Spotify or a playlist/song link.
If there is a Spotify code, do all the stuff in callback/index.js
. If any of the API calls fail because of a bad code, redirect the user to the base URL. If everything was successful, redirect the user to the base URL and also append a link to the playlist or song.
If there is a link to a playlist or song, display the result below the input box and tell users the playlist is in their Spotify account.
The redirect callback URL can be the home URL. The JavaScript just needs to check for a hash.