From 2b5751d50e7fe3bb7777a7c19d437722b500afb8 Mon Sep 17 00:00:00 2001 From: Anthony Merlo Date: Fri, 21 Aug 2026 00:08:31 +0100 Subject: [PATCH] =?UTF-8?q?fix:=20remove=20Script.done()=20=E2=80=94=20not?= =?UTF-8?q?=20a=20function=20in=20Scriptable?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/health-sync.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/health-sync.js b/scripts/health-sync.js index 32041c0..577d4b8 100644 --- a/scripts/health-sync.js +++ b/scripts/health-sync.js @@ -124,12 +124,11 @@ if (spo2) { }); } +// --- POST to server --- if (samples.length === 0) { await notify("No health data found today"); - Script.done(); -} +} else { -// --- POST to server --- const req = new Request(SERVER_URL); req.method = "POST"; req.headers = { @@ -143,4 +142,6 @@ try { await notify(`✓ Sent ${res.ingested || samples.length} samples`); } catch (e) { await notify(`✗ Error: ${e.message || e}`); -} \ No newline at end of file +} + +} // end else \ No newline at end of file