Skip to content

Commit

Permalink
🚚 chore(api) move verify-certification-code-service to src
Browse files Browse the repository at this point in the history
  • Loading branch information
yaf committed Jan 10, 2025
1 parent b71a251 commit 168505b
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 12 deletions.
3 changes: 0 additions & 3 deletions api/lib/domain/usecases/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ import { userOrgaSettingsRepository } from '../../../src/team/infrastructure/rep
import * as certificationChallengesService from '../../domain/services/certification-challenges-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 badgeAcquisitionRepository from '../../infrastructure/repositories/badge-acquisition-repository.js';
import * as badgeForCalculationRepository from '../../infrastructure/repositories/badge-for-calculation-repository.js';
import * as campaignRepository from '../../infrastructure/repositories/campaign-repository.js';
Expand Down Expand Up @@ -185,7 +184,6 @@ function requirePoleEmploiNotifier() {
* @typedef {certificationCourseRepository} CertificationCourseRepository
* @typedef {userRepository} UserRepository
* @typedef {certificationChallengesService} CertificationChallengesService
* @typedef {verifyCertificateCodeService} VerifyCertificateCodeService
* @typedef {assessmentRepository} AssessmentRepository
*/
const dependencies = {
Expand Down Expand Up @@ -332,7 +330,6 @@ const dependencies = {
userService,
userToCreateRepository,
userValidator,
verifyCertificateCodeService,
writeCsvUtils,
badgeCriteriaRepository,
sharedSessionRepository,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import _ from 'lodash';

import * as certificationCourseRepository from '../../../src/certification/shared/infrastructure/repositories/certification-course-repository.js';
import { config } from '../../../src/shared/config.js';
import { CertificateVerificationCodeGenerationTooManyTrials } from '../../../src/shared/domain/errors.js';
import { config } from '../../../../shared/config.js';
import { CertificateVerificationCodeGenerationTooManyTrials } from '../../../../shared/domain/errors.js';
import * as certificationCourseRepository from '../../../shared/infrastructure/repositories/certification-course-repository.js';

const availableCharacters =
`${config.availableCharacterForCode.numbers}${config.availableCharacterForCode.letters}`.split('');
Expand Down
2 changes: 1 addition & 1 deletion api/src/certification/evaluation/domain/usecases/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ import { dirname, join } from 'node:path';
import { fileURLToPath } from 'node:url';

import * as certificationChallengesService from '../../../../../lib/domain/services/certification-challenges-service.js';
import * as verifyCertificateCodeService from '../../../../../lib/domain/services/verify-certificate-code-service.js';
import { pickChallengeService } from '../../../../evaluation/domain/services/pick-challenge-service.js';
import * as languageService from '../../../../shared/domain/services/language-service.js';
import * as placementProfileService from '../../../../shared/domain/services/placement-profile-service.js';
import { injectDependencies } from '../../../../shared/infrastructure/utils/dependency-injection.js';
import { importNamedExportsFromDirectory } from '../../../../shared/infrastructure/utils/import-named-exports-from-directory.js';
import * as verifyCertificateCodeService from '../../../evaluation/domain/services/verify-certificate-code-service.js';
import * as flashAlgorithmService from '../../../flash-certification/domain/services/algorithm-methods/flash.js';
import {
answerRepository,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { readFile } from 'node:fs/promises';
import * as url from 'node:url';

import { generateCertificateVerificationCode } from '../../../../../lib/domain/services/verify-certificate-code-service.js';
import { generateCertificateVerificationCode } from '../../../../../src/certification/evaluation/domain/services/verify-certificate-code-service.js';
import { Assessment } from '../../../../../src/shared/domain/models/index.js';
import { AssessmentResult, Membership } from '../../../../../src/shared/domain/models/index.js';
import {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { generateCertificateVerificationCode } from '../../../../../lib/domain/services/verify-certificate-code-service.js';
import { generateCertificateVerificationCode } from '../../../../../src/certification/evaluation/domain/services/verify-certificate-code-service.js';
import { AutoJuryCommentKeys } from '../../../../../src/certification/shared/domain/models/JuryComment.js';
import { SESSIONS_VERSIONS } from '../../../../../src/certification/shared/domain/models/SessionVersion.js';
import { Assessment } from '../../../../../src/shared/domain/models/index.js';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import _ from 'lodash';

import * as verifyCertificateCodeService from '../../../../lib/domain/services/verify-certificate-code-service.js';
import { CertificateVerificationCodeGenerationTooManyTrials } from '../../../../src/shared/domain/errors.js';
import { catchErr, expect, sinon } from '../../../test-helper.js';
import * as verifyCertificateCodeService from '../../../../../../src/certification/evaluation/domain/services/verify-certificate-code-service.js';
import { CertificateVerificationCodeGenerationTooManyTrials } from '../../../../../../src/shared/domain/errors.js';
import { catchErr, expect, sinon } from '../../../../../test-helper.js';

describe('Unit | Service | VerifyCertificateCode', function () {
describe('#generateCertificateVerificationCode', function () {
Expand Down

0 comments on commit 168505b

Please sign in to comment.