【发布时间】:2019-07-11 04:34:38
【问题描述】:
Firebase 函数已成功执行,但未删除文档。没有错误。 ID 以正确的方式传递。
exports.toremove = functions.firestore
.document('school/toremove')
.onUpdate((change, context) => {
const newValue = change.after.data();
const id = newValue.id;
console.log("DELETING THE DOC with id= " + id)
return admin.firestore().collection('notifications').doc(id).delete();
});
【问题讨论】:
-
日志是否出现在控制台中?您只能在 Firebase 控制台中看到此类日志:console.firebase.google.com/project/_/functions/logs
标签: javascript firebase google-cloud-firestore google-cloud-functions