Use GET for uptime-kuma

This commit is contained in:
Christopher Cookman 2024-05-12 02:06:17 -06:00
parent 6fada9d3fc
commit 8b7f223493
Signed by: ChrisChrome
GPG key ID: A023A26E42C33A42

View file

@ -433,16 +433,12 @@ xmpp.on("stanza", (stanza) => {
xmpp.on("online", async (address) => {
if (config["uptime-kuma"].enabled) {
fetch(config["uptime-kuma"].url, {
method: 'POST'
}).then(() => {
fetch(config["uptime-kuma"].url).then(() => {
console.log(`${colors.cyan("[INFO]")} Sent heartbeat to Uptime Kuma`)
})
setInterval(() => {
// Send POST request to config["uptime-kuma"].url
fetch(config["uptime-kuma"].url, {
method: 'POST'
}).then(() => {
fetch(config["uptime-kuma"].url).then(() => {
console.log(`${colors.cyan("[INFO]")} Sent heartbeat to Uptime Kuma`)
})
}, config["uptime-kuma"].interval * 1000) // Every X seconds