Jer*_*olo 2 firebase google-cloud-datastore google-cloud-functions google-cloud-firestore
所以我的数据库中有这个架构: test1/{test1Id}/test2/{test2Id}
每当添加新数据库时,我都想在云函数中与我的数据库进行交互:
exports.test = functions.firestore
.document('test1/{test1Id}/test2/{test2Id}')
.onCreate(async (testsnap, context) => {
console.log(testsnap.id);
console.log(test1Id);
});
Run Code Online (Sandbox Code Playgroud)
但test1Id就是这样undefined。我怎样才能访问它?
先谢谢了。
| 归档时间: |
|
| 查看次数: |
778 次 |
| 最近记录: |