diff --git a/firestore/firestore-get.html b/firestore/firestore-get.html index 4ac2ee6..37f4248 100644 --- a/firestore/firestore-get.html +++ b/firestore/firestore-get.html @@ -5,6 +5,7 @@ color: '#a6bbcf', defaults: { name: {value:""}, + path: {value:""}, cred: {value: "", type: 'firebase-config'} }, inputs:1, @@ -38,9 +39,14 @@ +
+ + +
+
- +
diff --git a/firestore/firestore-get.js b/firestore/firestore-get.js index 52d9845..a071acd 100644 --- a/firestore/firestore-get.js +++ b/firestore/firestore-get.js @@ -30,12 +30,15 @@ module.exports = function(RED) { node.on('input', function(msg) { if(msg && msg.payload){ const path = msg.payload.path - setup() + setup(path) } }.bind(this)); - setup() + if(config.path){ + setup(config.path) + } + } RED.nodes.registerType("firestore-get", FirebaseAdmin);