Fix for merge option while setting value
This commit is contained in:
@ -14,7 +14,8 @@ module.exports = function(RED) {
|
||||
if(msg && msg.payload){
|
||||
console.log('firestore-set got input')
|
||||
console.dir(msg)
|
||||
const {path, obj, merge} = msg.payload
|
||||
const {path, obj} = msg.payload
|
||||
const merge = (msg.payload.merge == undefined) ? false : msg.payload.merge
|
||||
console.log('storing '+obj+' at firestore path '+path)
|
||||
this.admin.firestore().doc(path).set(obj, { merge }).then((res)=>{
|
||||
console.log('firestore set result '+res)
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "node-red-contrib-firebase-admin",
|
||||
"version": "1.1.22",
|
||||
"version": "1.1.23",
|
||||
"description": "A node-red module that wraps the server-side admin SDK of firebase, firestore, et.c.",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user