exports.calActivationPeriod = functions.https.onRequest((req,res)=>{
const postsArray = []
db.collection(`${PUBLIC_PROPERTIES}`).where('deleted',false).get()
.then((querySnapshot)=>{
console.log('posts collected: '+ querySnapshot.size);
querySnapshot.forEach((doc) =>{
postsArray.push({poId:doc.id,
activT:doc.data().activationTime,
counter:doc.data().counter,
userId:doc.data().userId,
isActive:doc.data().isActive});
});
return db.doc(`posts/count`).set(querySnapshot.size,{merge:true});
});
});
我曾经运行上面的函数,并且一切正常,我认为只有在我添加了图像处理的“清晰”模块后,该函数才开始失败并引发此错误
答案 0 :(得分:3)
正确的语法应为where('deleted','==',false)