fix: remove Script.done() — not a function in Scriptable
This commit is contained in:
parent
c65affc66c
commit
2b5751d50e
1 changed files with 5 additions and 4 deletions
|
|
@ -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}`);
|
||||
}
|
||||
}
|
||||
|
||||
} // end else
|
||||
Loading…
Add table
Reference in a new issue