以下のようなrealtime databaseで、match/{id}以下に更新があった場合に
Users/以下の情報を取得したいと考えております。
match/{id}以下のイベント検知はできていますが、
そこから上位階層のUsersのパス取得ができておりません!!!
どなたか方法をご存知の方がいればご教授ください!!
僕が書いたコードが以下になります。
swift
1exports.helloWorld = functions.database.ref('/match/{id}') 2.onWrite(( change,context) => { 3 4//ここでUsers/のパスを取得しようとしている 5const item = functions.database.ref('/Users') 6console.log('item', item) 7 8//ここは動いている 9 const message = change.after.val(); 10 console.log('helloWorld', message); 11 12 13 return 0; 14}); 15
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/10/19 14:32
2018/10/19 14:36
2018/10/19 17:13
2018/10/19 17:15
2018/10/19 17:22
2018/10/19 17:31