Skip to content
Permalink
Browse files

Fix credentials error

  • Loading branch information...
Klervix committed Jul 24, 2019
1 parent 4075b7b commit e47f45a595b34aa0f901a75a1bf1f712cca350ac
@@ -11,9 +11,13 @@ module.exports = function(RED) {
let node = this;

node.status({fill:"red", shape:"ring", text: 'Missing credential'});
this.visioncreds = RED.nodes.getCredentials(config.visionkey);

if (this.visioncreds) node.status({});
try {
this.visioncreds = RED.nodes.getNode(config.visionkey).credentials;
if (this.visioncreds) node.status({});
}
catch(err) {
this.visioncreds = {};
}

this.on('input', (data) => { input(RED, node, data, config) });
}
@@ -11,8 +11,13 @@ module.exports = function(RED) {
let node = this;

node.status({fill:"red", shape:"ring", text: 'Missing credential'});
this.facecreds = RED.nodes.getCredentials(config.facekey);
if (this.facecreds) node.status({});
try {
this.facecreds = RED.nodes.getNode(config.facekey).credentials;
if (this.facecreds) node.status({});
}
catch(err) {
this.facecreds = {};
}

this.on('input', (data) => { input(node, data, config) });
}
@@ -1,6 +1,6 @@
{
"name" : "node-red-contrib-viseo-ms-vision",
"version" : "0.1.0",
"version" : "0.1.1",
"description" : "VISEO Bot Maker - Microsoft Cognitive Services Vision",
"dependencies" : {
"node-red-contrib-viseo-ms-authentication" : "~0.0.0",

0 comments on commit e47f45a

Please sign in to comment.
You can’t perform that action at this time.