我有一个看起来像这样的 onCall 函数..
exports.getResults = functions.https.onCall((data, context) => {
const admin = context.auth.token.admin
const uniqueId = context.auth.uid
const doc = db.collection('collection').doc(data.docId)
return doc
.get()
.then(querySnapshot => {
return querySnapshot.docs.map(doc => {
const doc = doc.data()
const collectionDoc = {
docValues
}
return collectionDoc
})
})
Run Code Online (Sandbox Code Playgroud)
我的 console.log 将我请求的文档打印为对象,所以我不确定问题是什么?
javascript node.js firebase google-cloud-functions google-cloud-firestore