fix(backend): remove date_consentement_photo from gestionnaire update

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
MARTIN Julien 2026-02-24 23:15:29 +01:00
parent 119edbcfb4
commit 6749f2025a

View File

@ -91,13 +91,13 @@ export class GestionnairesService {
gestionnaire.password = await bcrypt.hash(dto.password, salt);
}
if (dto.date_consentement_photo !== undefined) {
gestionnaire.date_consentement_photo = dto.date_consentement_photo
? new Date(dto.date_consentement_photo)
: undefined;
}
// if (dto.date_consentement_photo !== undefined) {
// gestionnaire.date_consentement_photo = dto.date_consentement_photo
// ? new Date(dto.date_consentement_photo)
// : undefined;
// }
const { password, date_consentement_photo, ...rest } = dto;
const { password, ...rest } = dto;
Object.entries(rest).forEach(([key, value]) => {
if (value !== undefined) {
(gestionnaire as any)[key] = value;