mirror of
https://github.com/nfonteyne/octane-website.git
synced 2026-09-03 23:24:48 +02:00
update: better view concert history
This commit is contained in:
parent
0773f39763
commit
a09d16238b
7 changed files with 80 additions and 26 deletions
|
|
@ -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 });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue