diff --git a/CShocker/CShocker.csproj b/CShocker/CShocker.csproj
index 279caaa..15d853d 100644
--- a/CShocker/CShocker.csproj
+++ b/CShocker/CShocker.csproj
@@ -7,7 +7,7 @@
Glax
https://github.com/C9Glax/CShocker
git
- 1.2.4
+ 1.2.5
diff --git a/CShocker/Shockers/APIS/OpenShockHttp.cs b/CShocker/Shockers/APIS/OpenShockHttp.cs
index 38d8497..c755ed6 100644
--- a/CShocker/Shockers/APIS/OpenShockHttp.cs
+++ b/CShocker/Shockers/APIS/OpenShockHttp.cs
@@ -28,8 +28,7 @@ public class OpenShockHttp : HttpShocker
this.Logger?.Log(LogLevel.Debug, $"{requestDevices.RequestUri} response: {responseDevices.StatusCode}\n{deviceJson}");
JObject deviceListJObj = JObject.Parse(deviceJson);
List deviceIds = new();
- foreach(JToken device in deviceListJObj.SelectTokens("data"))
- deviceIds.Add(device.SelectToken("id")!.Value()!);
+ deviceIds.AddRange(deviceListJObj["data"]!.Children()["id"].Values()!);
List shockerIds = new();
foreach (string deviceId in deviceIds)
@@ -49,8 +48,7 @@ public class OpenShockHttp : HttpShocker
string shockerJson = shockerStreamReader.ReadToEnd();
this.Logger?.Log(LogLevel.Debug, $"{requestShockers.RequestUri} response: {response.StatusCode}\n{shockerJson}");
JObject shockerListJObj = JObject.Parse(shockerJson);
- foreach(JToken shocker in shockerListJObj.SelectTokens("data"))
- shockerIds.Add(shocker.SelectToken("id")!.Value()!);
+ shockerIds.AddRange(shockerListJObj["data"]!.Children()["id"].Values()!);
}
return shockerIds;