10 lines
320 B
TypeScript
10 lines
320 B
TypeScript
export async function checkTraccar()/*: Promise<string>*/ {
|
|
const url = "https://traccar.fjla.uk"
|
|
const data = await fetch(url)
|
|
const text = await data.text()
|
|
if ( data.status === 200 && text.includes("Traccar GPS Tracking System")) {
|
|
return "OK"
|
|
} else {
|
|
return "Unavailable"
|
|
}
|
|
} |