Skip to content
This repository was archived by the owner on Apr 6, 2024. It is now read-only.

Commit d3fb003

Browse files
committed
fix: use correct nightscout client to fetch latest import dates
1 parent a066fa9 commit d3fb003

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/index.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,9 @@ export function startSynchronization({
9595
pollingIntervalMs,
9696
async () => {
9797
// identify lower time limit (= last known earliest record imported from diasend to nightscout)
98-
const latestImportDates = await fetchLatestImportDatesByTreatmentType();
98+
const latestImportDates = await fetchLatestImportDatesByTreatmentType(
99+
nightscoutClient
100+
);
99101

100102
// to determine date from fetching, ignore the SGV values
101103
let dateFrom =
@@ -239,7 +241,7 @@ type LatestImportDatesByTreatmentType = {
239241
};
240242

241243
async function fetchLatestImportDatesByTreatmentType(
242-
nightscoutClient = getNightscoutHttpClient()
244+
nightscoutClient: NightscoutClient
243245
): Promise<LatestImportDatesByTreatmentType> {
244246
// check for latest import dates of all treatment types ...
245247
const treatmentTypesLatestImportDates = treatmentTypes

0 commit comments

Comments
 (0)