Skip to content

Commit

Permalink
Merge pull request #88 from Samsung/dev
Browse files Browse the repository at this point in the history
Fix: The Params property of the AWS SDK node did not work as described as optional.
  • Loading branch information
hojoon22-lee authored Apr 25, 2024
2 parents faf95a9 + c9194d3 commit f216540
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 f216540

Please sign in to comment.