nightscout / cgm-remote-monitor

nightscout web monitor
GNU Affero General Public License v3.0
2.36k stars 71.43k forks source link

Treatments inconsistency via APIv3 #8151

Open justmara opened 9 months ago

justmara commented 9 months ago

Describe the bug APIv3 returns different results for same dataset

To Reproduce Using latests NS 15.0.2 from dev Timestamp of 1698344578438 is 2023-10-26T6:22:58.438Z

A call to /api/v3/treatments/history/1698344578438?limit=500 returns NOTHING (empty array with status 200)

A call to /api/v3/treatments?sort=date&created_at$gt=2023-10-26T06:22:58.438Z&limit=500 returns ONLY Temp Basals / TempTargets

A call to /api/v3/treatments?sort=date&date$gt=2023-10-26T06:22:58.438Z&limit=500 returns Boluses/Carbs/etc, but NO TBS/TT

MilosKozak commented 8 months ago

it's because all records doesn't have both date and created_at and to query /history records must be uploaded by v3