fixed typo in rtdb get node and added auto setup for firestore and rtdb get
This commit is contained in:
@ -5,6 +5,7 @@
|
|||||||
color: '#a6bbcf',
|
color: '#a6bbcf',
|
||||||
defaults: {
|
defaults: {
|
||||||
name: {value:""},
|
name: {value:""},
|
||||||
|
path: {value:""},
|
||||||
cred: {value: "", type: 'firebase-config'}
|
cred: {value: "", type: 'firebase-config'}
|
||||||
},
|
},
|
||||||
inputs:1,
|
inputs:1,
|
||||||
@ -38,9 +39,14 @@
|
|||||||
<input type="text" id="node-input-name" placeholder="Name">
|
<input type="text" id="node-input-name" placeholder="Name">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="form-row">
|
||||||
|
<label for="node-input-path"><i class="icon-tag"></i> Path</label>
|
||||||
|
<input type="text" id="node-input-path" placeholder="Path">
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<label for="node-input-cred"><i class="icon-tag"></i> Credentials</label>
|
<label for="node-input-cred"><i class="icon-tag"></i> Credentials</label>
|
||||||
<input type="text" id="node-input-cred" placeholder="Name">
|
<input type="text" id="node-input-cred" placeholder="Credentials">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -30,12 +30,15 @@ module.exports = function(RED) {
|
|||||||
node.on('input', function(msg) {
|
node.on('input', function(msg) {
|
||||||
if(msg && msg.payload){
|
if(msg && msg.payload){
|
||||||
const path = msg.payload.path
|
const path = msg.payload.path
|
||||||
setup()
|
setup(path)
|
||||||
|
|
||||||
}
|
}
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
|
|
||||||
setup()
|
if(config.path){
|
||||||
|
setup(config.path)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
RED.nodes.registerType("firestore-get", FirebaseAdmin);
|
RED.nodes.registerType("firestore-get", FirebaseAdmin);
|
||||||
|
|||||||
Reference in New Issue
Block a user