Skip to content

Commit

Permalink
Fix: The Params property of the AWS SDK node did not work as describe…
Browse files Browse the repository at this point in the history
…d as optional.
  • Loading branch information
jongsu2 committed Apr 24, 2024
1 parent faf95a9 commit c9194d3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions 301-AWS.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,12 @@ module.exports = function(RED) {
if (typeof awsService[node.methods] == "function"){
node.status({fill:"blue",shape:"dot",text:node.methods});

var paramValue = JSON.parse(mustache.render(node.params, new NodeContext(msg, node.context())));
var request = awsService[node.methods](paramValue || msg.param, _cb);
if (node.params) {
const paramValue = JSON.parse(mustache.render(node.params, new NodeContext(msg, node.context())));
awsService[node.methods](paramValue, _cb);
} else {
awsService[node.methods](msg.params, _cb);
}
} else {
node.error("failed: Invalid Operation - " + node.methods);
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "node-red-contrib-samsung-automation-studio-nodes",
"version": "1.1.19",
"version": "1.1.20",
"description": "Samsung Automation Studio Nodes for Node-RED",
"keywords": [
"SmartThings",
Expand Down

0 comments on commit c9194d3

Please sign in to comment.