diff --git a/projects/IoTCenter/Services/PageHub.cs b/projects/IoTCenter/Services/PageHub.cs index ce749073..d9a4082e 100644 --- a/projects/IoTCenter/Services/PageHub.cs +++ b/projects/IoTCenter/Services/PageHub.cs @@ -29,10 +29,7 @@ namespace IoTCenter.Services } else if (message == "ApiCallback") { - if (!string.IsNullOrEmpty(connectionId)) - { - this.ServerToClient(connectionId, "ApiCallback", message); - } + this.ApiCallback(message, connectionId); } } @@ -96,5 +93,13 @@ namespace IoTCenter.Services } } } + + public void ApiCallback(string message, string connectionId) + { + if (!string.IsNullOrEmpty(connectionId)) + { + this.ServerToClient(connectionId, "ApiCallback", message); + } + } } } \ No newline at end of file