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