Skip to content

Commit

Permalink
fix(uptime): use get instead of post (#228)
Browse files Browse the repository at this point in the history
  • Loading branch information
aldy505 authored Apr 8, 2024
1 parent 280079b commit 7382c33
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/uptime.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 (;;) {
Expand All @@ -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());
Expand Down

0 comments on commit 7382c33

Please sign in to comment.