-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(indicateurs): possibilite de telechargement du modele, correctio…
…n d'un bug de telechargement de l'excel
- Loading branch information
Showing
7 changed files
with
115 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
TRAJECTOIRE_SNBC_SHEET_ID= | ||
TRAJECTOIRE_SNBC_XLSX_ID= | ||
TRAJECTOIRE_SNBC_RESULT_FOLDER_ID= | ||
GCLOUD_SERVICE_ACCOUNT_KEY= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { Logger } from '@nestjs/common'; | ||
import * as fs from 'fs'; | ||
|
||
const logger = new Logger('gcloud.helper'); | ||
|
||
export const initApplicationCredentials = () => { | ||
if ( | ||
process.env.GCLOUD_SERVICE_ACCOUNT_KEY && | ||
!process.env.GOOGLE_APPLICATION_CREDENTIALS | ||
) { | ||
const serviceAccountFile = `${__dirname}/keyfile.json`; | ||
logger.log( | ||
`Writing Google Cloud credentials to file: ${serviceAccountFile}`, | ||
); | ||
fs.writeFileSync( | ||
serviceAccountFile, | ||
process.env.GCLOUD_SERVICE_ACCOUNT_KEY, | ||
); | ||
process.env.GOOGLE_APPLICATION_CREDENTIALS = serviceAccountFile; | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters