File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed
Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change 1- import admin , { type ServiceAccount } from "firebase-admin" ;
1+ import admin from "firebase-admin" ;
22import Logger from "../utils/logger" ;
3- import { readFileSync , existsSync } from "fs" ;
3+ import { existsSync } from "fs" ;
44import MonkeyError from "../utils/error" ;
55import path from "path" ;
66import { isDevEnvironment } from "../utils/misc" ;
@@ -24,14 +24,8 @@ export function init(): void {
2424 ) ;
2525 }
2626 } else {
27- const serviceAccount = JSON . parse (
28- readFileSync ( SERVICE_ACCOUNT_PATH , {
29- encoding : "utf8" ,
30- flag : "r" ,
31- } )
32- ) as ServiceAccount ;
3327 admin . initializeApp ( {
34- credential : admin . credential . cert ( serviceAccount ) ,
28+ credential : admin . credential . cert ( SERVICE_ACCOUNT_PATH ) ,
3529 } ) ;
3630 Logger . success ( "Firebase app initialized" ) ;
3731 }
You can’t perform that action at this time.
0 commit comments