update: better view concert history

This commit is contained in:
Nathan FONTEYNE 2026-07-08 16:16:51 +02:00
parent 0773f39763
commit a09d16238b
7 changed files with 80 additions and 26 deletions

View file

@ -21,9 +21,11 @@ router.post(
return res.status(400).json({ error: 'expected_array_of_slots' });
}
try {
await calendarRepo.ingestSlots(slots);
workflowState.setSuccess();
res.json({ ok: true, count: slots.length });
const summary = await calendarRepo.ingestSlots(slots);
workflowState.setSuccess(
`${summary.slotsProcessed} créneaux reçus, ${summary.availabilityRows} disponibilités enregistrées`
);
res.json({ ok: true, ...summary });
} catch (err) {
workflowState.setError(err.message);
res.status(500).json({ error: err.message });