This can be used to edit a single field within a child, or to add a new field entirely. You can find out more about which write option to use here: https://www.firebase.com/docs/web/guide/saving-data.html

Usage

Hover over inputs/exits for more info.

var Firebase =require('machinepack-firebase');

// Update data in a Firebase child node per field.

Firebase.updateData({

firebaseURL: 'your-firebase-database.firebaseio.com/users',

write: {},

child: 'users',

}).exec({

// An unexpected error occurred.

error: function (err) {

},

// OK.

success: function () {

},

});

Inputs

firebaseURL
required

The reference URL for your Firebase dataset. NOTE: Refer to the specific location you need to update as this machine can only work on one child level. For example, add /users/ to the URL, and the specific user as the child.