I am trying to create a simple firebase query using nodejs and firebase. Everytime i run this query i keep getting db_coll.where(...).update is not a function . I am not sure what i am doing wrong. Any help would be really appreciated.
Below is mu code.
const db_coll = db.collection('orders');
db_coll.where('store_id', '==', storeId)
.update({is_confirmed: 1})
.then(() => {
console.log('Documents successfully updated!');
})
.catch((error) => {
console.error('Error updating documents:', error);
});