forked from Ethanscharlie/Happy-Ripper
Cleaned code
This commit is contained in:
@@ -106,8 +106,13 @@
|
||||
const response = await fetch("/status", { method: "GET" });
|
||||
const statusJson = await response.json();
|
||||
|
||||
const currentInfo = statusJson.currentReleaseInfo;
|
||||
statusMessage.innerHTML = createCard(currentInfo.artist, currentInfo.title, currentInfo.status, currentInfo.art_url);
|
||||
if ("currentReleaseInfo" in statusJson) {
|
||||
const currentInfo = statusJson.currentReleaseInfo;
|
||||
statusMessage.innerHTML = createCard(currentInfo.artist, currentInfo.title, statusJson.status, currentInfo.art_url);
|
||||
}
|
||||
else {
|
||||
statusMessage.innerHTML = `<p>${statusJson.status}</p>`;
|
||||
}
|
||||
|
||||
queueTableBody.innerHTML = "";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user