Skip to content

Commit

Permalink
Fix Default endpoint for openshock
Browse files Browse the repository at this point in the history
  • Loading branch information
C9Glax committed Jan 16, 2025
1 parent 828a1a2 commit 34fb4d8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CShocker/Devices/APIs/OpenShockHttp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ protected override void ControlInternal(ControlAction action, Shocker shocker, i
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)
{
}
}
2 changes: 1 addition & 1 deletion CShocker/Devices/APIs/OpenShockSerial.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class OpenShockSerial : OpenShockApi
public SerialPortInfo SerialPortI;
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._serialPort = new SerialPort(serialPortI.PortName, BaudRate);
Expand Down

0 comments on commit 34fb4d8

Please sign in to comment.