Compare commits

...
Author SHA1 Message Date
jmartinandCursor 0842f66df8 fix: typage comment insert card_responses
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-25 10:54:02 +02:00
jmartin c3fd098464 Merge branch 'feature/fix-card-respond-id-card' into develop 2026-09-25 10:52:37 +02:00
jmartinandCursor ed3546d196 fix(#194): insert card_responses avec id_card explicite
TypeORM nullifiait id_card (conflit Column/JoinColumn) → 500 sur respond.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-25 10:52:36 +02:00
jmartin da6836cda3 Merge branch 'feature/170-fix-api-couples-am' into develop
fix(#170): API couples-garde AM + bandeau parents unifié.
2026-09-25 10:42:24 +02:00
+3 -5
View File
@@ -204,14 +204,12 @@ export class CardsService {
throw new BadRequestException('Motivation obligatoire en cas de refus'); throw new BadRequestException('Motivation obligatoire en cas de refus');
} }
await this.responsesRepo.save( await this.responsesRepo.insert({
this.responsesRepo.create({
id_card: card.id, id_card: card.id,
id_utilisateur: userId, id_utilisateur: userId,
action: dto.action, action: dto.action,
comment: dto.comment?.trim(), comment: dto.comment?.trim() || undefined,
}), });
);
if (card.id_absence) { if (card.id_absence) {
if (dto.action === CardResponseActionType.ACCEPT || dto.action === CardResponseActionType.ACK) { if (dto.action === CardResponseActionType.ACCEPT || dto.action === CardResponseActionType.ACK) {