Firebase cloud function onUpdate child of list (NodeJs)
问题 How to trigger the firebase cloud function onUpdate each time any of the child "order_status" is == "accepted" (included the old Childs on trigger) my code won't work Have a look please : Code: exports.checkOrderStatus = functions.database.ref("/RestaurantOrders").onUpdate(async (change, context) => { var orderStatus = change.after.val().order_status; if (orderStatus == "accepted") { code... } else { return } } 回答1: exports.checkOrderStatus = functions.database.ref("/RestaurantOrders/{pushId}