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',
|
||||
defaults: {
|
||||
name: {value:""},
|
||||
path: {value:""},
|
||||
cred: {value: "", type: 'firebase-config'}
|
||||
},
|
||||
inputs:1,
|
||||
@ -38,9 +39,14 @@
|
||||
<input type="text" id="node-input-name" placeholder="Name">
|
||||
</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">
|
||||
<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>
|
||||
|
||||
</script>
|
||||
|
||||
@ -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);
|
||||
|
||||
Reference in New Issue
Block a user