mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-04 12:33:03 +00:00
add album header info
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
let base_uri = "http://127.0.0.1:9876";
|
||||
|
||||
const getAlbum = async (name) => {
|
||||
const res = await fetch(base_uri + "/albums/" + name);
|
||||
|
||||
if (!res.ok) {
|
||||
const message = `An error has occured: ${res.status}`;
|
||||
throw new Error(message);
|
||||
}
|
||||
|
||||
const data = await res.json();
|
||||
|
||||
return data;
|
||||
};
|
||||
|
||||
export default getAlbum;
|
||||
Reference in New Issue
Block a user