add album header info

This commit is contained in:
geoffrey45
2021-12-27 23:12:00 +03:00
parent 3f52bb74d8
commit ff6a4e34b5
9 changed files with 141 additions and 63 deletions
+16
View File
@@ -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;