【发布时间】:2020-06-29 00:19:13
【问题描述】:
我需要找到我使用 .where(...) 获取的文档的文档标签(名称/id?)
我做错了什么?
// updates dev team in the db
function updateDevTeam(devToUpdate, update) { // devToUpdate = id of dev, fieldToUpdate = goal, name, or team_id, update = value
var devToUpdateDocument = fb.db.collection('dev').where('id', '==', devToUpdate) //how do I set this to the document id(/name/path?)
fb.db.collection('dev').doc(devToUpdateDocument).update({ team_id: update })
}
【问题讨论】:
标签: javascript database firebase google-cloud-firestore