When I add a cloud function that responds to the delete event, for example:
exports.onDeleteSector = functions.database.ref('/sectores/{idSector}').onDelete((event) =>
I can get the key to the sector to be deleted in event.params.idSector, proving that the trigger works, however it event.data.val()returns null.
The deleted entry contains links to the children that need to be deleted. How can I get them before the parent leaves?
thank
source
share