Skip to content
This repository has been archived by the owner on Mar 14, 2024. It is now read-only.

Commit

Permalink
fix: add missing provider configuration for CouchSqsClient and CouchD…
Browse files Browse the repository at this point in the history
…bClient (#24)
  • Loading branch information
tomwwinter authored Feb 16, 2024
1 parent 3f94832 commit a07b3e3
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/report/report.module.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
import { Module } from '@nestjs/common';
import { DefaultReportStorage } from './storage/report-storage.service';
import { ReportController } from './controller/report.controller';
import { HttpModule } from '@nestjs/axios';
import { HttpModule, HttpService } from '@nestjs/axios';
import { ReportRepository } from './repository/report-repository.service';
import { ReportCalculationRepository } from './repository/report-calculation-repository.service';
import { ReportCalculationController } from './controller/report-calculation.controller';
import { ReportCalculationTask } from './tasks/report-calculation-task.service';
import { ReportCalculationProcessor } from './tasks/report-calculation-processor.service';
import { SqsReportCalculator } from './core/sqs-report-calculator.service';
import { CouchDbClient } from '../couchdb/couch-db-client.service';
import { CreateReportCalculationUseCase } from './core/use-cases/create-report-calculation-use-case.service';
import { CouchSqsClient } from '../couchdb/couch-sqs.client';
import { CouchSqsClientFactory } from './di/couchdb-sqs-configuration';
import { ConfigService } from '@nestjs/config';
import { CouchDbClient } from '../couchdb/couch-db-client.service';

@Module({
controllers: [ReportController, ReportCalculationController],
Expand All @@ -22,6 +25,11 @@ import { CreateReportCalculationUseCase } from './core/use-cases/create-report-c
ReportCalculationProcessor,
SqsReportCalculator,
CouchDbClient,
{
provide: CouchSqsClient,
useFactory: CouchSqsClientFactory,
inject: [HttpService, ConfigService],
},
CreateReportCalculationUseCase,
],
exports: [DefaultReportStorage, CreateReportCalculationUseCase],
Expand Down

0 comments on commit a07b3e3

Please sign in to comment.