mirror of
https://github.com/Expand-sys/ccashfrontend
synced 2025-12-16 23:02:13 +11:00
allow website to respond when ccash instance down
This commit is contained in:
parent
07b9afd505
commit
2a57bab0a2
1 changed files with 10 additions and 5 deletions
15
index.js
15
index.js
|
|
@ -80,11 +80,16 @@ fastify.get("/", async function (req, res) {
|
|||
let errors = req.session.errors;
|
||||
req.session.errors = "";
|
||||
console.log(`${api}/api/properties`);
|
||||
let checkalive = await fetch(`${api}/api/properties`, {
|
||||
headers: {
|
||||
Accept: "application/json",
|
||||
},
|
||||
});
|
||||
try{
|
||||
let checkalive = await fetch(`${api}/api/properties`, {
|
||||
headers: {
|
||||
Accept: "application/json",
|
||||
},
|
||||
});
|
||||
} catch (e){
|
||||
console.log(e)
|
||||
}
|
||||
|
||||
let alive = false
|
||||
if (checkalive.ok) {
|
||||
alive = true;
|
||||
|
|
|
|||
Loading…
Reference in a new issue