From 98a0e5633d43f89e4fdabb67ffcb327116d0fa8b Mon Sep 17 00:00:00 2001 From: Reinaldy Rafli Date: Mon, 8 Apr 2024 10:36:29 +0700 Subject: [PATCH] fix(uptime): use get instead of post --- src/uptime.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/uptime.js b/src/uptime.js index e54c42b..3306e6c 100644 --- a/src/uptime.js +++ b/src/uptime.js @@ -17,7 +17,7 @@ async function run(url) { searchParams.set("ping", "0"); searchParams.set("status", "up"); - await got.post(url + "?" + searchParams.toString()); + await got.get(url + "?" + searchParams.toString()); } for (;;) { @@ -44,7 +44,7 @@ for (;;) { // How long do we need to sleep const now = new Date(); - const nextTime = new Date(now.getUTCFullYear(), now.getUTCMonth(), now.getUTCDate(), now.getUTCHours(), now.getUTCMinutes() + 1, now.getUTCSeconds(), 0); + const nextTime = new Date(now.getUTCFullYear(), now.getUTCMonth(), now.getUTCDate(), now.getUTCHours(), now.getUTCMinutes() + 1, 0, 0); // eslint-disable-next-line no-await-in-loop await sleep(nextTime.getTime() - now.getTime());