I am facing issues when trying to update certain values in my firestore collection within my nuxt project.
const batch = writeBatch(firestore);
const data = query(collection(firestore, `notifications`, `${uid}/news`));
const querySnapshot = await getDocs(data);
querySnapshot.forEach(doc => {
if (doc.data().type === 'like') {
batch.update(doc, { seen: true });
}
batch.commit();
});