获取从URL ID在火力地堡

问题描述:

云功能如果我有这行代码:获取从URL ID在火力地堡

functions.database.ref('/users/{randomid}/{uid}') 

我可以从UID通过event.data.key拿到钥匙;但是我怎样才能从ID randomid? randomkey由Swift中的childByAutoId生成。谢谢。

+0

它的文档中描述:https://firebase.google.com/docs/functions/database-events –

如果你想获得{randomid}使用生成的密钥:

const randomid= event.params.randomid;