I want Cloud Function trigger only when document is create and update. I do not want Cloud Function trigger onDelete
.
Is there any trigger for only onCreate
and onUpdate
without make 2 separate function?
I see Firebase have onWrite
, but this trigger also onDelete
:
onCreate Triggered when a document is written to for the first time.
onUpdate Triggered when a document already exists and has any value
changed. onDelete Triggered when a document with data is deleted.
onWrite Triggered when onCreate, onUpdate or onDelete is triggered.
Thanks everyone!