File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
firestore/extend-with-functions/functions Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -66,14 +66,14 @@ function triggerDocumentAnyChange() {
66
66
exports . modifyUser = functions . firestore
67
67
. document ( 'users/{userID}' )
68
68
. onWrite ( ( change , context ) => {
69
- // Get an object with the current document value.
70
- // If the document does not exist, it has been deleted.
71
- const document = change . after . exists ? change . after . data ( ) : null ;
69
+ // Get an object with the current document value.
70
+ // If the document does not exist, it has been deleted.
71
+ const document = change . after . exists ? change . after . data ( ) : null ;
72
72
73
- // Get an object with the previous document value (for update or delete)
74
- const oldDocument = change . before . data ( ) ;
73
+ // Get an object with the previous document value (for update or delete)
74
+ const oldDocument = change . before . data ( ) ;
75
75
76
- // perform desired operations ...
76
+ // perform desired operations ...
77
77
} ) ;
78
78
// [END trigger_document_any_change]
79
79
}
You can’t perform that action at this time.
0 commit comments