I am writing cloud functions with the Google Firestore database.
I am trying to write recursively deleting more data. I cannot find syntax for accessing and deleting data in other parts of the database. The code that I already have is below.
exports.deleteProject = functions.firestore.document('{userID}/projects/easy/{projectID}').onDelete(event => {
console.log(event.data.previous.data())
var deletedValue = event.data.previous.data();
});
I found some information here, but I don’t have time to check it, if I find something useful, I will fix the issue.
https://firebase.google.com/docs/firestore/manage-data/delete-data?authuser=0
source
share