I have an onCall function that looks like this..
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
})
})
my console.log prints the doc I am requesting as an object, so I'm not sure what the issue is?