小编Gab*_*ssa的帖子

从Firebase的云功能中的Firestore触发器获取用户ID?

在下面的示例中,有没有办法获取写入'offers/{offerId}'的用户的用户ID(uid)?我试着像这里描述的那样做,但它在Firestore中不起作用.

exports.onNewOffer = functions.firestore
  .document('offers/{offerId}')
  .onCreate(event => {
    ...
});
Run Code Online (Sandbox Code Playgroud)

node.js firebase google-cloud-platform google-cloud-functions google-cloud-firestore

11
推荐指数
4
解决办法
6210
查看次数