From 7382c332521018a51ae33f26bb068be65dadd0df Mon Sep 17 00:00:00 2001 From: Reinaldy Rafli Date: Mon, 8 Apr 2024 10:36:49 +0700 Subject: [PATCH] fix(uptime): use get instead of post (#228) --- 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());