Просмотр исходного кода

Fix(?) deleteGlucose functionality in NightscoutManager and DataTableProvider

Rhys 3 месяцев назад
Родитель
Сommit
e311f4ff07
1 измененных файлов с 4 добавлено и 4 удалено
  1. 4 4
      Trio/Sources/Services/Network/Nightscout/NightscoutAPI.swift

+ 4 - 4
Trio/Sources/Services/Network/Nightscout/NightscoutAPI.swift

@@ -167,7 +167,7 @@ extension NightscoutAPI {
         components.path = Config.treatmentsPath
         components.path = Config.treatmentsPath
 
 
         components.queryItems = [
         components.queryItems = [
-            URLQueryItem(name: "find[id][$eq]", value: id)
+            URLQueryItem(name: "find[_id][$eq]", value: id)
         ]
         ]
 
 
         var request = URLRequest(url: components.url!)
         var request = URLRequest(url: components.url!)
@@ -193,9 +193,9 @@ extension NightscoutAPI {
         components.scheme = url.scheme
         components.scheme = url.scheme
         components.host = url.host
         components.host = url.host
         components.port = url.port
         components.port = url.port
-        components.path = Config.treatmentsPath
+        components.path = Config.uploadEntriesPath
         components.queryItems = [
         components.queryItems = [
-            URLQueryItem(name: "find[id][$eq]", value: id)
+            URLQueryItem(name: "find[_id][$eq]", value: id)
         ]
         ]
 
 
         guard let url = components.url else {
         guard let url = components.url else {
@@ -227,7 +227,7 @@ extension NightscoutAPI {
         components.port = url.port
         components.port = url.port
         components.path = Config.treatmentsPath
         components.path = Config.treatmentsPath
         components.queryItems = [
         components.queryItems = [
-            URLQueryItem(name: "find[id][$eq]", value: id)
+            URLQueryItem(name: "find[_id][$eq]", value: id)
         ]
         ]
 
 
         guard let url = components.url else {
         guard let url = components.url else {