Fix Default endpoint for openshock

This commit is contained in:
glax 2025-01-16 22:40:27 +01:00
parent 828a1a2bfa
commit 34fb4d89bd
2 changed files with 2 additions and 2 deletions

View File

@ -31,7 +31,7 @@ public class OpenShockHttp : OpenShockApi
ApiHttpClient.MakeAPICall(HttpMethod.Post, $"{Endpoint}/2/shockers/control", json, this.Logger, new ValueTuple<string, string>("OpenShockToken", ApiKey)); ApiHttpClient.MakeAPICall(HttpMethod.Post, $"{Endpoint}/2/shockers/control", json, this.Logger, new ValueTuple<string, string>("OpenShockToken", ApiKey));
} }
public OpenShockHttp(string apiKey, string endpoint = "https://api.openshock.app", ILogger? logger = null) : base(DeviceApi.OpenShockHttp, apiKey, endpoint, logger) public OpenShockHttp(string apiKey, string? endpoint = null, ILogger? logger = null) : base(DeviceApi.OpenShockHttp, apiKey, endpoint??DefaultEndpoint, logger)
{ {
} }
} }

View File

@ -13,7 +13,7 @@ public class OpenShockSerial : OpenShockApi
public SerialPortInfo SerialPortI; public SerialPortInfo SerialPortI;
private readonly SerialPort _serialPort; private readonly SerialPort _serialPort;
public OpenShockSerial(SerialPortInfo serialPortI, string apiKey, string endpoint = "https://api.shocklink.net", ILogger? logger = null) : base(DeviceApi.OpenShockSerial, apiKey, endpoint, logger) public OpenShockSerial(SerialPortInfo serialPortI, string apiKey, string? endpoint = null, ILogger? logger = null) : base(DeviceApi.OpenShockSerial, apiKey, endpoint??DefaultEndpoint, logger)
{ {
this.SerialPortI = serialPortI; this.SerialPortI = serialPortI;
this._serialPort = new SerialPort(serialPortI.PortName, BaudRate); this._serialPort = new SerialPort(serialPortI.PortName, BaudRate);