mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-05 13:03:02 +00:00
major refactors
- remove jpgs - add new album header - remove duplicate components - display album bio on client - add a route loader module - change color scheme - other minor changes
This commit is contained in:
@@ -38,7 +38,27 @@ const getAlbumArtists = async (name, artist) => {
|
||||
return data.artists;
|
||||
};
|
||||
|
||||
const getAlbumBio = async(name, artist) => {
|
||||
const res = await fetch(
|
||||
base_uri +
|
||||
"/album/" +
|
||||
encodeURIComponent(name.replaceAll("/", "|")) +
|
||||
"/" +
|
||||
encodeURIComponent(artist.replaceAll("/", "|")) +
|
||||
"/bio"
|
||||
);
|
||||
|
||||
if (!res.ok) {
|
||||
const message = `An error has occured: ${res.status}`;
|
||||
throw new Error(message);
|
||||
}
|
||||
|
||||
const data = await res.json();
|
||||
return data.bio;
|
||||
};
|
||||
|
||||
export default {
|
||||
getAlbumTracks,
|
||||
getAlbumArtists,
|
||||
getAlbumBio
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user