Changed internal domain names and enclosured getProcesses' content in try catch block so no 500 error occur at least because of that.

This commit is contained in:
Alexander Andreev 2021-11-26 19:25:36 +04:00
parent ddd4e839d0
commit 447dd15e06
Signed by: Arav
GPG Key ID: 610DF2574456329F

View File

@ -33,9 +33,13 @@ const articles_meta = {
};
async function getProcesses() {
let reimu = await fetch("http://reimu.arav.home:14882/processes").then(r => r.json());
let sakuya = await fetch("http://sakuya.arav.home:14882/processes").then(r => r.json());
return Object.fromEntries(Object.entries(reimu).concat(Object.entries(sakuya)));
try {
let reimu = await fetch("http://reimu.arav.home.arpa:14882/processes").then(r => r.json());
let sakuya = await fetch("http://sakuya.arav.home.arpa:14882/processes").then(r => r.json());
return Object.fromEntries(Object.entries(reimu).concat(Object.entries(sakuya)));
} catch {
return [];
}
}
function setRoutes() {