diff --git a/firebase.json b/firebase.json index 9b424de..29279c0 100644 --- a/firebase.json +++ b/firebase.json @@ -48,10 +48,7 @@ "firebase-debug.log", "firebase-debug.*.log" ], - "predeploy": [ - "npm --prefix \"$RESOURCE_DIR\" run lint", - "npm --prefix \"$RESOURCE_DIR\" run build" - ] + "predeploy": ["npm --prefix \"$RESOURCE_DIR\" run build"] } ] } diff --git a/functions/src/firestoreBackup.ts b/functions/src/firestoreBackup.ts index 0e68907..cb748ad 100644 --- a/functions/src/firestoreBackup.ts +++ b/functions/src/firestoreBackup.ts @@ -1,5 +1,5 @@ import * as firestore from "@google-cloud/firestore"; -import { onSchedule } from "firebase-functions/scheduler"; +import { onSchedule } from "firebase-functions/v2/scheduler"; const bucket = "gs://profile-cloud-firestore-backup"; const client = new firestore.v1.FirestoreAdminClient(); diff --git a/functions/src/publicCloudQueries.ts b/functions/src/publicCloudQueries.ts index b4f27ec..3dc9b66 100644 --- a/functions/src/publicCloudQueries.ts +++ b/functions/src/publicCloudQueries.ts @@ -3,7 +3,7 @@ import * as admin from "firebase-admin"; import { onRequest, Request } from "firebase-functions/v2/https"; import { defineSecret } from "firebase-functions/params"; import { SecretParam } from "firebase-functions/lib/params/types"; -const intechstudioApiKey = defineSecret("X-INTECHSTUDIO-KEY"); +const intechstudioApiKey = defineSecret("X_INTECHSTUDIO_KEY"); admin.initializeApp(); const db = admin.firestore(); @@ -15,7 +15,7 @@ function validateApiKey( ) { // Get the API key from request headers const requestApiKey = - req.headers["x-intechstudio-key"] || + req.headers["x_intechstudio_key"] || req.get("Authorization")?.replace("Bearer ", ""); // Get the expected API key from secret