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() {
15
15
credential : admin . credential . applicationDefault ( )
16
16
} ) ;
17
17
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]
19
23
20
24
// [END initialize_app]
21
25
return db ;
Original file line number Diff line number Diff line change @@ -2,6 +2,10 @@ const functions = require('firebase-functions');
2
2
const admin = require ( 'firebase-admin' ) ;
3
3
4
4
const db = admin . firestore ( ) ;
5
+ // [START_EXCLUDE]
6
+ const settings = { timestampsInSnapshots : true } ;
7
+ db . settings ( settings ) ;
8
+ // [END_EXCLUDE]
5
9
6
10
// [START aggregate_function]
7
11
exports . aggregateRatings = functions . firestore
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ const functions = require('firebase-functions');
4
4
5
5
admin . initializeApp ( ) ;
6
6
7
+
7
8
/**
8
9
* Callable function that creates a custom auth token with the
9
10
* custom attribute "admin" set to true.
You can’t perform that action at this time.
0 commit comments