This commit is contained in:
Expand 2023-11-30 14:29:54 +11:00
parent 2a57bab0a2
commit d047a217b3

View file

@ -80,8 +80,9 @@ fastify.get("/", async function (req, res) {
let errors = req.session.errors;
req.session.errors = "";
console.log(`${api}/api/properties`);
let checkalive
try{
let checkalive = await fetch(`${api}/api/properties`, {
checkalive = await fetch(`${api}/api/properties`, {
headers: {
Accept: "application/json",
},
@ -91,7 +92,7 @@ fastify.get("/", async function (req, res) {
}
let alive = false
if (checkalive.ok) {
if (await checkalive.ok) {
alive = true;
}