Merge pull request #9830 from jeremyguarini/fix_gcs_auth

Fix authentication with GCS for techdocs
This commit is contained in:
Eric Peterson
2022-02-26 17:13:50 +01:00
committed by GitHub
2 changed files with 7 additions and 1 deletions
@@ -83,7 +83,7 @@ export class GoogleGCSPublish implements PublisherBase {
const credentials = config.getOptionalString(
'techdocs.publisher.googleGcs.credentials',
);
let credentialsJson = {};
let credentialsJson: any = {};
if (credentials) {
try {
credentialsJson = JSON.parse(credentials);
@@ -96,6 +96,7 @@ export class GoogleGCSPublish implements PublisherBase {
const storageClient = new Storage({
...(credentials && {
projectId: credentialsJson.project_id,
credentials: credentialsJson,
}),
});