Skip to content

Commit 064da2d

Browse files
authored
Merge pull request #487 from kenime/patch-3
Support msg.params.endpoint
2 parents dcdb4a9 + 5dd79f5 commit 064da2d

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

services/assistant/v1-workspace-manager.js

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1050,7 +1050,12 @@ module.exports = function (RED) {
10501050
username = sUsername || this.credentials.username;
10511051
password = sPassword || this.credentials.password || config.password;
10521052
apikey = sApikey || this.credentials.apikey || config.apikey;
1053-
1053+
endpoint = sEndpoint;
1054+
1055+
if (config['cwm-service-endpoint']) {
1056+
endpoint = config['cwm-service-endpoint'];
1057+
}
1058+
10541059
// All method to be overridden
10551060
if (msg.params) {
10561061
if (msg.params.method) {
@@ -1068,10 +1073,9 @@ module.exports = function (RED) {
10681073
if (msg.params.version) {
10691074
version = msg.params.version;
10701075
}
1071-
}
1072-
endpoint = sEndpoint;
1073-
if (config['cwm-service-endpoint']) {
1074-
endpoint = config['cwm-service-endpoint'];
1076+
if (msg.params.endpoint) {
1077+
endpoint = msg.params.endpoint;
1078+
}
10751079
}
10761080

10771081
node.status({});

0 commit comments

Comments
 (0)