I have a question about writing to firestore from cloud functions after geofirestore query.
I queried my firestore collection users/userId/pros', and got documentsusers/userId/pros/proId1' and `users/userId/pros/proId2' from the geofirestore query.
Now, I want to add 'notif' collection to these documents - proId1, proId2. For that, I wrote code in cloud functions like this;
After executing this code, I get error on cloud functions console saying 'TypeError: Cannot read property 'collection' of undefined'. Please give me some tip on how to fix this code to make this work. Thanks.
I have a question about writing to firestore from cloud functions after geofirestore query. I queried my firestore collection
users/userId/pros', and got documents
users/userId/pros/proId1' and `users/userId/pros/proId2' from the geofirestore query. Now, I want to add 'notif' collection to these documents - proId1, proId2. For that, I wrote code in cloud functions like this;After executing this code, I get error on cloud functions console saying 'TypeError: Cannot read property 'collection' of undefined'. Please give me some tip on how to fix this code to make this work. Thanks.