Skip to content

Commit

Permalink
[TECH] Remettre l'usage de skillDatasource dans les seeds
Browse files Browse the repository at this point in the history
  • Loading branch information
pix-service-auto-merge authored Nov 29, 2024
2 parents c7b2a41 + ad5b634 commit 6aa1507
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/db/seeds/data/common/tooling/learning-content.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import _ from 'lodash';

import { skillDatasource } from '../../../../../src/shared/infrastructure/datasources/learning-content/index.js';
import * as challengeRepository from '../../../../../src/shared/infrastructure/repositories/challenge-repository.js';
import * as competenceRepository from '../../../../../src/shared/infrastructure/repositories/competence-repository.js';
import * as skillRepository from '../../../../../src/shared/infrastructure/repositories/skill-repository.js';
import { logger } from '../../../../../src/shared/infrastructure/utils/logger.js';

let ALL_COMPETENCES, ALL_ACTIVE_SKILLS, ALL_CHALLENGES, ACTIVE_SKILLS_BY_COMPETENCE, ACTIVE_SKILLS_BY_TUBE;
Expand Down Expand Up @@ -35,7 +35,7 @@ async function getCoreCompetences() {

async function getAllActiveSkills() {
if (!ALL_ACTIVE_SKILLS) {
ALL_ACTIVE_SKILLS = (await skillRepository.list()).filter((skill) => skill.status === 'actif');
ALL_ACTIVE_SKILLS = await skillDatasource.findActive();
}
return ALL_ACTIVE_SKILLS;
}
Expand Down

0 comments on commit 6aa1507

Please sign in to comment.