File tree Expand file tree Collapse file tree 3 files changed +10
-1
lines changed
solution-aggregation/functions
solution-deletes/functions Expand file tree Collapse file tree 3 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,11 @@ function initializeApp() {
1515 credential : admin . credential . applicationDefault ( )
1616 } ) ;
1717
18- var db = admin . firestore ( ) ;
18+ const db = admin . firestore ( ) ;
19+ // [START_EXCLUDE]
20+ const settings = { timestampsInSnapshots : true } ;
21+ db . settings ( settings ) ;
22+ // [END_EXCLUDE]
1923
2024 // [END initialize_app]
2125 return db ;
Original file line number Diff line number Diff line change @@ -2,6 +2,10 @@ const functions = require('firebase-functions');
22const admin = require ( 'firebase-admin' ) ;
33
44const db = admin . firestore ( ) ;
5+ // [START_EXCLUDE]
6+ const settings = { timestampsInSnapshots : true } ;
7+ db . settings ( settings ) ;
8+ // [END_EXCLUDE]
59
610// [START aggregate_function]
711exports . aggregateRatings = functions . firestore
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ const functions = require('firebase-functions');
44
55admin . initializeApp ( ) ;
66
7+
78/**
89 * Callable function that creates a custom auth token with the
910 * custom attribute "admin" set to true.
You can’t perform that action at this time.
0 commit comments