10 - this ends up pretty similar to the SongListComponent
17 - In practice, I'm not sure how we want to handle the api's base url, since I think the idea was to have the api also serve the website files. For now I just hardcoded the baseurl, but it is a starting point at least.
I did not write any unit tests for these methods, since they essentially are just fetch method calls with a routine .json() executed on the response. If someone more familiar with frontend testing has an idea of something to implement, I'd be happy to take a shot at it.
10 - this ends up pretty similar to the SongListComponent
17 - In practice, I'm not sure how we want to handle the api's base url, since I think the idea was to have the api also serve the website files. For now I just hardcoded the baseurl, but it is a starting point at least.
.json()
executed on the response. If someone more familiar with frontend testing has an idea of something to implement, I'd be happy to take a shot at it.