fix(auth): inscription AM — persister photo si photo_base64 sans photo_filename (#120)
- Défaut nom fichier photo_am.jpg ; extension finale dérivée du data-URL - Swagger DTO + description endpoint register/am Made-with: Cursor
This commit is contained in:
@@ -465,8 +465,11 @@ export class AuthService {
|
||||
dateExpiration.setDate(dateExpiration.getDate() + joursExpirationToken);
|
||||
|
||||
let urlPhoto: string | null = null;
|
||||
if (dto.photo_base64 && dto.photo_filename) {
|
||||
urlPhoto = await this.sauvegarderPhotoDepuisBase64(dto.photo_base64, dto.photo_filename);
|
||||
const photoB64 = (dto.photo_base64 ?? '').trim();
|
||||
if (photoB64) {
|
||||
const nomFichier =
|
||||
(dto.photo_filename ?? '').trim() || 'photo_am.jpg';
|
||||
urlPhoto = await this.sauvegarderPhotoDepuisBase64(photoB64, nomFichier);
|
||||
}
|
||||
|
||||
const dateConsentementPhoto =
|
||||
|
||||
Reference in New Issue
Block a user