added environment variables to control updates of flows

This commit is contained in:
Peter Svensson
2019-06-23 20:59:10 +02:00
parent 0af1a1b15a
commit 8b0ee83c8c
4 changed files with 22 additions and 5 deletions

View File

@ -19,6 +19,7 @@ module.exports = function(RED) {
console.log('flow-to-rtdb path='+this.path+', flowId='+this.flowId)
runtime.flows.getFlow({id: this.flowId}).then((flow)=>{
flow.updated_at = Date.now()
this.admin.database().ref(this.path).set(flow).then((res)=>{
console.log('firebase set result '+res)
console.dir(res)