【发布时间】:2019-04-13 23:46:55
【问题描述】:
假设我在 typescript/javascript 代码函数中指向如下路径:
exports.sendNotification = functions.database.ref('shops/countries/{countryName}/shopAddress/{currentShopAddress}')
.onWrite((snapshot,context) => {
// Is it possible to get the data raw value from a child reference node?
// For example:
const countryName = snapshot.before.parent('countryName').val();
// Then
const countryId = countryName['countryId'];
})
我是 node.js/typescript 和 firebase 云功能新手 :)
【问题讨论】:
标签: node.js typescript firebase firebase-realtime-database google-cloud-functions