Skip to content

Commit

Permalink
Fix PPSApiFormDataGenerator instanciation parsing issue
Browse files Browse the repository at this point in the history
  • Loading branch information
abarghoud committed Jan 5, 2025
1 parent eaaae94 commit 9fd1b3f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion apps/api/src/app/pps/pps.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ import {
} from './domain/authentication-metadata-extractor/pps-api-response-authentication-metadata-extractor';
import { SharedModule } from '../shared/shared.module';
import { PPSProfileDTOToRunnerPersonalInfos } from './domain/pps-profile-dto-to-runner-personal-infos';
import { plainToInstance } from 'class-transformer';
import { PPSProfileDto } from './domain/pps-profile-dto.model';

@Module({
exports: [IPPSGenerateUseCaseSymbol],
Expand All @@ -36,7 +38,7 @@ import { PPSProfileDTOToRunnerPersonalInfos } from './domain/pps-profile-dto-to-
{
provide: PPSApiFormDataGenerator,
useFactory: (request: Request) =>
new PPSApiFormDataGenerator(new PPSProfileDTOToRunnerPersonalInfos(request.body)),
new PPSApiFormDataGenerator(new PPSProfileDTOToRunnerPersonalInfos(plainToInstance(PPSProfileDto, request.body))),
inject: [REQUEST],
scope: Scope.REQUEST,
},
Expand Down

0 comments on commit 9fd1b3f

Please sign in to comment.