阅读背景:

如何在Cloud Function中获取firebase数据库中的节点值

来源:互联网 
exports.respublished = 
functions.database.ref('/Posts/{postid}').onWrite(event => {
  const snapshot = event.data;
  const postid = event.params.examid;
  const uid = snapshot.child('uid').val();
  const ispublic = snapshot.child('Public').val();
  firebase.database.ref('Users/' + uid).once(event => {
    const snapshot = event.data;
    const name = snapshot.child('name').val();
  });
});
exports.respublished = 
functions.database.ref(



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: