I'm triggering a cloud function with onWrite. Within the onWrite function, I want to do something with the ref ID of the document that was written. How can I grab this? My current code looks something like this, but I don't know how to fill eventID.
exports.syncEvents = functions.firestore
.document('events/{eventID}')
.onWrite((change, context) => {
admin.firestore().collection('users').doc(host).collection('events').doc(eventID).set({
active: true
})
});