【发布时间】:2022-01-13 04:51:52
【问题描述】:
我想从 firestore 读取未经身份验证的用户的数据 收集位置是 users->swipes->id
我的尝试没有成功
const querySnapshot = await getDocs(collection(db, "users",id,"swipes"));
querySnapshot.forEach((doc) => {
// doc.data() is never undefined for query doc snapshots
console.log(doc.id, " => ", doc.data());
});
我想在滑动中读取 id,而不是从 user.uid 这里用户中有 3 个用户 如果想从 user.uid 读取,很容易
collection(db, "users",user.id,"swipes")
如果想从其他用户那里阅读 我很困惑 请帮忙
【问题讨论】:
标签: javascript react-native google-cloud-firestore