When I add a cloud function responding to a delete event, like this one:
exports.onDeleteSector = functions.database.ref('/sectores/{idSector}').onDelete((event) =>
I can get the key to the sector being deleted in event.params.idSector proving the trigger works, however, event.data.val() returns null.
The deleted record contains the references to the children to be deleted. How can I get those before the parent is gone?
Thanks