Skip to content

Instantly share code, notes, and snippets.

@nanborklabs
Created June 27, 2017 09:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nanborklabs/4bf6014cb9b7773e4c7f0efc9e4caf0d to your computer and use it in GitHub Desktop.
Save nanborklabs/4bf6014cb9b7773e4c7f0efc9e4caf0d to your computer and use it in GitHub Desktop.
Parent of Snapshot
exports.deliveryUpdate = functions.database.ref('/orders/{pushId}/deliveryStatus').onWrite(snapshot => {
// Fires up , if Delilery status is Changed, to know Whihch Key
console.log("PushId/Parent Key: "+ snapshot.data.ref.parent.key);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment