fix: contact database read/write mismatch overwrote all entries
All checks were successful
Deploy Production / Deploy to Production (push) Successful in 21s

Read was from the white-paper page, write was to livres-blancs — so
each submission started from an empty (or wrong) entries array and
replaced the full database. Both now read from livres-blancs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
isUnknown 2026-06-01 13:48:13 +02:00
parent 82e69c7259
commit 1cbad99143

View file

@ -50,7 +50,7 @@ return [
// ── Stocker le lead dans contactDatabase ──────────────────
$company = trim($body['company'] ?? '');
$role = trim($body['role'] ?? '');
$entries = $page->contactDatabase()->toStructure()->toArray();
$entries = page('livres-blancs')->contactDatabase()->toStructure()->toArray();
$existingIndex = null;
foreach ($entries as $i => $entry) {