这是我的代码,我无法通过不在数据库中获取所有帖子来更新用户发表的评论
db.collection('posts').get().then(querySnapShot=>{
querySnapShot.docs.forEach(doc=>{
db.collection('posts').doc(doc.id).collection('comments').where('uid','==',sponse.uid).get().then(
querySnapShot=>{
querySnapShot.docs.forEach(doc2=>{
db.collection('posts').doc(doc.id).collection('comments').doc(doc2.id).update({
profilePic:remoteUri
})
})
}
)
})
})