mirror of
https://github.com/Expand-sys/ccashfrontend
synced 2025-12-18 23:52:14 +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;
|
let errors = req.session.errors;
|
||||||
req.session.errors = "";
|
req.session.errors = "";
|
||||||
console.log(`${api}/api/properties`);
|
console.log(`${api}/api/properties`);
|
||||||
let checkalive = await fetch(`${api}/api/properties`, {
|
try{
|
||||||
headers: {
|
let checkalive = await fetch(`${api}/api/properties`, {
|
||||||
Accept: "application/json",
|
headers: {
|
||||||
},
|
Accept: "application/json",
|
||||||
});
|
},
|
||||||
|
});
|
||||||
|
} catch (e){
|
||||||
|
console.log(e)
|
||||||
|
}
|
||||||
|
|
||||||
let alive = false
|
let alive = false
|
||||||
if (checkalive.ok) {
|
if (checkalive.ok) {
|
||||||
alive = true;
|
alive = true;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue