feat(#135): mode édition dossier + ajout co-parent (squash develop).
Wizard edit famille/AM, POST co-parent, PATCH enfants avec photo. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -141,12 +141,20 @@ export class EnfantsController {
|
||||
RoleType.GESTIONNAIRE,
|
||||
)
|
||||
@Patch(':id')
|
||||
@ApiOperation({
|
||||
summary: 'Mettre à jour un enfant',
|
||||
description:
|
||||
'JSON sans photo OK ; avec nouvelle photo → multipart (champ fichier `photo`, max 5 Mo).',
|
||||
})
|
||||
@ApiConsumes('application/json', 'multipart/form-data')
|
||||
@UseInterceptors(OptionalEnfantPhotoInterceptor)
|
||||
update(
|
||||
@Param('id', new ParseUUIDPipe()) id: string,
|
||||
@Body() dto: UpdateEnfantsDto,
|
||||
@UploadedFile() photo: Express.Multer.File,
|
||||
@User() currentUser: Users,
|
||||
) {
|
||||
return this.enfantsService.update(id, dto, currentUser);
|
||||
return this.enfantsService.update(id, dto, currentUser, photo);
|
||||
}
|
||||
|
||||
@Roles(RoleType.SUPER_ADMIN)
|
||||
|
||||
Reference in New Issue
Block a user