From d353f02b6facc198e4fd98b90c733ef55ae85cb3 Mon Sep 17 00:00:00 2001 From: Peter Svensson Date: Fri, 12 Jul 2019 15:09:13 +0200 Subject: [PATCH] fixed typo in rtdb get node and added auto setup for firestore and rtdb get --- firestore/firestore-get.html | 8 +++++++- firestore/firestore-get.js | 7 +++++-- 2 files changed, 12 insertions(+), 3 deletions(-) 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);