From e4a631b9291f87bc06a430cb1cfdce44d620dd5c Mon Sep 17 00:00:00 2001 From: shancheas Date: Wed, 7 Aug 2024 12:30:55 +0700 Subject: [PATCH] fix: move google credential to folder --- .../json/google-credential.json | 0 .../managers/helpers/create-event-calanedar.helper.ts | 7 +------ 2 files changed, 1 insertion(+), 6 deletions(-) rename google-credential.json => assets/json/google-credential.json (100%) diff --git a/google-credential.json b/assets/json/google-credential.json similarity index 100% rename from google-credential.json rename to assets/json/google-credential.json diff --git a/src/modules/configuration/google-calendar/domain/usecases/managers/helpers/create-event-calanedar.helper.ts b/src/modules/configuration/google-calendar/domain/usecases/managers/helpers/create-event-calanedar.helper.ts index 8f674fd..23f82f1 100644 --- a/src/modules/configuration/google-calendar/domain/usecases/managers/helpers/create-event-calanedar.helper.ts +++ b/src/modules/configuration/google-calendar/domain/usecases/managers/helpers/create-event-calanedar.helper.ts @@ -1,6 +1,5 @@ import { google } from 'googleapis'; import * as fs from 'fs'; -import * as path from 'path'; import { TransactionEntity } from 'src/modules/transaction/transaction/domain/entities/transaction.entity'; export async function CreateEventCalendarHelper( @@ -9,11 +8,7 @@ export async function CreateEventCalendarHelper( ) { let result; - const filePath = path.join( - __dirname, - '../../../../../../../../', - 'google-credential.json', - ); + const filePath = './assets/json/google-credential.json'; const credential = JSON.parse(fs.readFileSync(filePath, 'utf8')); const client = new google.auth.JWT({