send an ad at startup

This commit is contained in:
xunuwu 2025-08-15 05:35:01 +02:00
parent 862c8ab896
commit ad3a9e894d
Signed by: xun
SSH key fingerprint: SHA256:Uot/1WoAjWAeqLOHA5vYy4phhVydsH7jCPmBjaPZfgI

View file

@ -1,6 +1,6 @@
console.log("started"); console.log("started");
setInterval(() => { function sendAd() {
fetch("https://api.rolimons.com/tradeads/v1/createad", { fetch("https://api.rolimons.com/tradeads/v1/createad", {
method: "POST", method: "POST",
credentials: "include", credentials: "include",
@ -21,4 +21,8 @@ setInterval(() => {
console.log(x); console.log(x);
}); });
}); });
}, 60_000 * 5); }
sendAd();
setInterval(sendAd, 60_000 * 5);