mirrorer

:)
git clone https://git.sr.ht/~ashymad/mirrorer
Log | Files | Refs | LICENSE

commit 55f20fb769c8cff460e5960a1180f85107de11a1
parent 46d3928a49e589e55d10af6ad5fb4a1f2b8f7cda
Author: Szymon Mikulicz <szymon.mikulicz@posteo.net>
Date:   Sat, 13 Jun 2026 23:27:14 +0200

Await x 2

Diffstat:
Mworker/src/index.ts | 7+++++--
1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/worker/src/index.ts b/worker/src/index.ts @@ -21,7 +21,7 @@ export default { }, async scheduled(event, env, ctx): Promise<void> { - let resp = fetch('https://builds.sr.ht/query', { + let resp = await fetch('https://builds.sr.ht/query', { method: 'POST', headers: { 'Content-Type': 'application/json', @@ -32,6 +32,9 @@ export default { }) }); - console.log(`trigger fired at ${event.cron}: ${resp.text()}`); + resp.text().then(function (text) { + console.log(`Response at ${event.cron}: ${text}`); + }); + }, } satisfies ExportedHandler<Env>;