fix(backend): remove date_consentement_photo from gestionnaire update
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
119edbcfb4
commit
6749f2025a
@ -91,13 +91,13 @@ export class GestionnairesService {
|
|||||||
gestionnaire.password = await bcrypt.hash(dto.password, salt);
|
gestionnaire.password = await bcrypt.hash(dto.password, salt);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dto.date_consentement_photo !== undefined) {
|
// if (dto.date_consentement_photo !== undefined) {
|
||||||
gestionnaire.date_consentement_photo = dto.date_consentement_photo
|
// gestionnaire.date_consentement_photo = dto.date_consentement_photo
|
||||||
? new Date(dto.date_consentement_photo)
|
// ? new Date(dto.date_consentement_photo)
|
||||||
: undefined;
|
// : undefined;
|
||||||
}
|
// }
|
||||||
|
|
||||||
const { password, date_consentement_photo, ...rest } = dto;
|
const { password, ...rest } = dto;
|
||||||
Object.entries(rest).forEach(([key, value]) => {
|
Object.entries(rest).forEach(([key, value]) => {
|
||||||
if (value !== undefined) {
|
if (value !== undefined) {
|
||||||
(gestionnaire as any)[key] = value;
|
(gestionnaire as any)[key] = value;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user