0
我目前在iOS应用程序中观察到Firebase数据库中的数据。我想使用Firebase函数创建我自己的observe
函数,该函数在返回数据之前从单独的数据库中提取。用于Firebase云端功能的自定义观察器
有什么方法可以重新创建我自己版本的Firebase API的观察方法吗?这是我目前为止的内容
exports.onChildAdded = functions.https.onRequest((request, response) => {
var ref = firebase.database().ref("data");
ref.on("child_added", function(snapshot) {
console.log(snapshot.key);
var allData;
allData.firebase = snapshot;
//pull from other database
allData.other = otherDatabaseData;
response.send(allData);
});
})
这是不幸的,我想我只需要在设备端提出两个请求。 –