【发布时间】:2018-04-25 03:17:59
【问题描述】:
我正在使用 set 函数在 Firestore 中创建一个新文档。我想在set函数将数据推入数据库后使用文档数据。
// Add each record to their respective heads
let docRef = headCollectionRef.doc(data.headSlug).collection(recordsCollection)
.doc(String(data.recordData.sNo))
docRef.set(data).then(docSnap => {
agreementData.push(
docSnap.get().then(data => {
return data
})
)
})
then() 中的任何内容都没有被执行。
非常感谢任何帮助
【问题讨论】:
标签: node.js firebase google-cloud-firestore