3216 request a new access token for the gmail api when it expires (#3224)

* refresh access token

* refresh and save access token

* update module

* refreshing access token before fetching the emails

* remove log
This commit is contained in:
bosiraphael
2024-01-03 18:00:31 +01:00
committed by GitHub
parent 90f89e31a6
commit 4ebaacc306
3 changed files with 87 additions and 1 deletions

View File

@ -5,10 +5,15 @@ import { EnvironmentModule } from 'src/integrations/environment/environment.modu
import { DataSourceModule } from 'src/metadata/data-source/data-source.module';
import { FetchBatchMessagesService } from 'src/workspace/messaging/services/fetch-batch-messages.service';
import { FetchWorkspaceMessagesService } from 'src/workspace/messaging/services/fetch-workspace-messages.service';
import { RefreshAccessTokenService } from 'src/workspace/messaging/services/refresh-access-token.service';
@Module({
imports: [TypeORMModule, DataSourceModule, EnvironmentModule],
providers: [FetchWorkspaceMessagesService, FetchBatchMessagesService],
providers: [
FetchWorkspaceMessagesService,
FetchBatchMessagesService,
RefreshAccessTokenService,
],
exports: [FetchWorkspaceMessagesService],
})
export class FetchWorkspaceMessagesModule {}