Skip to content

Commit

Permalink
- Fix *Api.Call(..)* method bug
Browse files Browse the repository at this point in the history
  • Loading branch information
genemars committed Dec 4, 2024
1 parent 2579581 commit 5aeabd0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/HomeGenie/Automation/Scripting/ApiHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ public object Call(string apiCommand, object data = null)
NetHelper netHelper = new NetHelper(homegenie);
netHelper
.WebService($"http://localhost:{port}/api/{apiCommand}")
.Put(JsonConvert.SerializeObject(data));
.Put(data?.ToString());
var username = homegenie.SystemConfiguration.HomeGenie.Username;
var password = homegenie.SystemConfiguration.HomeGenie.Password;
if (!String.IsNullOrEmpty(username) && !String.IsNullOrEmpty(password))
Expand Down

0 comments on commit 5aeabd0

Please sign in to comment.