Skip to content

Commit

Permalink
fix(api): fix path pole emploi notifier
Browse files Browse the repository at this point in the history
  • Loading branch information
xav-car committed Dec 12, 2024
1 parent 11a3cd1 commit 7dc4395
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
11 changes: 0 additions & 11 deletions api/lib/domain/events/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ import { logger } from '../../../src/shared/infrastructure/utils/logger.js';
import * as eventBusBuilder from '../../infrastructure/events/EventBusBuilder.js';
import { EventDispatcher } from '../../infrastructure/events/EventDispatcher.js';
import { EventDispatcherLogger } from '../../infrastructure/events/EventDispatcherLogger.js';
import * as disabledPoleEmploiNotifier from '../../infrastructure/externals/pole-emploi/disabled-pole-emploi-notifier.js';
import * as poleEmploiNotifier from '../../infrastructure/externals/pole-emploi/pole-emploi-notifier.js';
import * as badgeAcquisitionRepository from '../../infrastructure/repositories/badge-acquisition-repository.js';
import * as campaignParticipationResultRepository from '../../infrastructure/repositories/campaign-participation-result-repository.js';
import * as campaignRepository from '../../infrastructure/repositories/campaign-repository.js';
Expand All @@ -48,14 +46,6 @@ import { handleComplementaryCertificationsScoring } from './handle-complementary

const { performance } = perf_hooks;

function requirePoleEmploiNotifier() {
if (config.poleEmploi.pushEnabled) {
return poleEmploiNotifier;
} else {
return disabledPoleEmploiNotifier;
}
}

const dependencies = {
answerRepository,
assessmentRepository,
Expand Down Expand Up @@ -83,7 +73,6 @@ const dependencies = {
knowledgeElementRepository,
logger,
organizationRepository,
poleEmploiNotifier: requirePoleEmploiNotifier(),
poleEmploiSendingRepository,
scoringCertificationService,
skillRepository,
Expand Down
4 changes: 2 additions & 2 deletions api/lib/domain/usecases/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ import { organizationForAdminRepository } from '../../../src/organizational-enti
import { tagRepository } from '../../../src/organizational-entities/infrastructure/repositories/tag.repository.js';
import * as campaignManagementRepository from '../../../src/prescription/campaign/infrastructure/repositories/campaign-management-repository.js';
import * as divisionRepository from '../../../src/prescription/campaign/infrastructure/repositories/division-repository.js';
import * as disabledPoleEmploiNotifier from '../../../src/prescription/campaign-participation/infrastructure/externals/pole-emploi/disabled-pole-emploi-notifier.js';
import * as poleEmploiNotifier from '../../../src/prescription/campaign-participation/infrastructure/externals/pole-emploi/pole-emploi-notifier.js';
import * as campaignAssessmentParticipationRepository from '../../../src/prescription/campaign-participation/infrastructure/repositories/campaign-assessment-participation-repository.js';
import * as campaignAssessmentParticipationResultRepository from '../../../src/prescription/campaign-participation/infrastructure/repositories/campaign-assessment-participation-result-repository.js';
import * as campaignParticipationRepository from '../../../src/prescription/campaign-participation/infrastructure/repositories/campaign-participation-repository.js';
Expand Down Expand Up @@ -124,8 +126,6 @@ import * as mailService from '../../domain/services/mail-service.js';
import * as obfuscationService from '../../domain/services/obfuscation-service.js';
import * as passwordGenerator from '../../domain/services/password-generator.js';
import * as verifyCertificateCodeService from '../../domain/services/verify-certificate-code-service.js';
import * as disabledPoleEmploiNotifier from '../../infrastructure/externals/pole-emploi/disabled-pole-emploi-notifier.js';
import * as poleEmploiNotifier from '../../infrastructure/externals/pole-emploi/pole-emploi-notifier.js';
import * as badgeAcquisitionRepository from '../../infrastructure/repositories/badge-acquisition-repository.js';
import * as badgeForCalculationRepository from '../../infrastructure/repositories/badge-for-calculation-repository.js';
import { campaignParticipationResultRepository } from '../../infrastructure/repositories/campaign-participation-result-repository.js';
Expand Down

0 comments on commit 7dc4395

Please sign in to comment.