Skip to content

Commit

Permalink
[TECH] ♻️ Utiliser un seul système de vérification d'email
Browse files Browse the repository at this point in the history
  • Loading branch information
pix-service-auto-merge authored Nov 28, 2024
2 parents cd399f7 + 492483b commit f353cf4
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 58 deletions.
12 changes: 0 additions & 12 deletions api/lib/domain/services/email-validator.js

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { createReadStream } from 'node:fs';

import { emailIsValid } from '../../../../lib/domain/services/email-validator.js';
import { DomainTransaction } from '../../../shared/domain/DomainTransaction.js';
import * as emailValidationService from '../../../shared/domain/services/email-validation-service.js';
import { CsvColumn } from '../../../shared/infrastructure/serializers/csv/csv-column.js';
import { CsvParser } from '../../../shared/infrastructure/serializers/csv/csv-parser.js';
import { getDataBuffer } from '../../../shared/infrastructure/utils/buffer.js';
Expand Down Expand Up @@ -117,7 +117,7 @@ async function checkOrganizationUpdate(organizationBatchUpdateDto, organizationF

if (
organizationBatchUpdateDto.dataProtectionOfficerEmail &&
!emailIsValid(organizationBatchUpdateDto.dataProtectionOfficerEmail)
!emailValidationService.validateEmailSyntax(organizationBatchUpdateDto.dataProtectionOfficerEmail)
) {
throw new DpoEmailInvalid({
meta: {
Expand Down
44 changes: 0 additions & 44 deletions api/tests/unit/domain/services/email-validator_test.js

This file was deleted.

0 comments on commit f353cf4

Please sign in to comment.