Skip to content

Commit

Permalink
Create function to initialize firebase
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxime Alza committed Jul 29, 2024
1 parent 1a27fe0 commit 6e7d5eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion translation-app-assessment/backend/cleanup/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ const projectId = process.env.GCP_PROJECT

// Call initializeFirebase during startup
initializeFirebase();
const firestore = firebaseAdmin.firestore()

// Function to write monitoring "heartbeat" that cleanup has run
const writeMonitoring = async () => {
Expand Down Expand Up @@ -83,6 +82,7 @@ app.get('/', async (req, res) => {
app.post('/', async (req, res, next) => {
try {

const firestore = firebaseAdmin.firestore()

await kpi()
// Delete chat that have been expired for an hour or longer
Expand Down

0 comments on commit 6e7d5eb

Please sign in to comment.