We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ce9c73b commit fc6dd82Copy full SHA for fc6dd82
functions/firestore-export/index.js
@@ -9,8 +9,10 @@ const bucket = 'gs://BUCKET_NAME';
9
exports.scheduledFirestoreExport = functions.pubsub
10
.schedule('every 24 hours')
11
.onRun((context) => {
12
+
13
+ const projectId = process.env.GCP_PROJECT || process.env.GCLOUD_PROJECT;
14
const databaseName =
- client.databasePath(process.env.GCP_PROJECT, '(default)');
15
+ client.databasePath(projectId, '(default)');
16
17
return client.exportDocuments({
18
name: databaseName,
0 commit comments