I have created the following functions:
It has been deployed and is there on the firebase hosting, but it just doesn't ever get called (usage is 0)...
It should be called when a user document is changed and then update a field to null if it wasn't already null.
Can anyone see why this is not running?
exports.deleteField = functions.database.ref('/Users/{userID}') .onUpdate((change, context) => { const overrideTag = change.after.data().overrideTag if (overrideTag !== null) { const db = admin.firestore() db.collection('Users').doc(userID).set({ overrideTag: null }) } }) Kind Regards, Josh