Skip to content

Commit

Permalink
feat(api): use new env FIREBASE_STORAGE_BUCKET
Browse files Browse the repository at this point in the history
  • Loading branch information
rhahao authored Dec 27, 2024
1 parent 43bcef3 commit c51bc20
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/v3/config/firebase_config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ const serviceAccount = JSON.parse(Buffer.from(process.env.GOOGLE_CONFIG_BASE64!,

const suffix = process.env.FIREBASE_STORAGE_SUFFIX || 'firebasestorage.app';

const storageBucket = process.env.FIREBASE_STORAGE_BUCKET || `${process.env.FIREBASE_APP_NAME}.${suffix}`;

initializeApp({
projectId: process.env.FIREBASE_APP_NAME,
credential: cert(serviceAccount),
storageBucket: `${process.env.FIREBASE_APP_NAME}.${suffix}`,
storageBucket,
});

0 comments on commit c51bc20

Please sign in to comment.