From cf79db89e3879d2fd2476c926893904d67d730d9 Mon Sep 17 00:00:00 2001 From: teenageknight Date: Sun, 22 Sep 2024 12:01:41 -0400 Subject: [PATCH] we build this back up --- functions/src/index.ts | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/functions/src/index.ts b/functions/src/index.ts index 45c8551..1d77977 100644 --- a/functions/src/index.ts +++ b/functions/src/index.ts @@ -11,7 +11,7 @@ import { onCall } from "firebase-functions/v2/https"; const fetch = require("node-fetch"); const Geocodio = require("geocodio-library-node"); -const { initializeApp } = require("firebase-admin/app"); +const { initializeApp, cert } = require("firebase-admin/app"); const { getFirestore } = require("firebase-admin/firestore"); // let serviceAccountLocal: any; @@ -33,15 +33,17 @@ const { getFirestore } = require("firebase-admin/firestore"); console.log("right outside of the if"); // console.log(serviceAccountLocal); -// if (serviceAccountLocal) { -// const config = { -// credential: cert(serviceAccountLocal), -// }; +if (false) { + const serviceAccountLocal = require("../service-account-keys/bryce-jackson-website-firebase-adminsdk-ra4es-7428ff5320.json"); -// initializeApp(config); -// } else { -// initializeApp(); -// } + const config = { + credential: cert(serviceAccountLocal), + }; + + initializeApp(config); +} else { + initializeApp(); +} initializeApp();