From 35b865cdd4e4f7ebd3fc6518627e39260670f314 Mon Sep 17 00:00:00 2001 From: Cedric Date: Thu, 18 Jun 2026 14:19:16 +0200 Subject: [PATCH] Actualiser api.php --- api.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api.php b/api.php index 7c6ef70..67770d3 100644 --- a/api.php +++ b/api.php @@ -86,7 +86,7 @@ switch ($action) { $id = !empty($data['id']) ? $data['id'] : makeStableId($data['title'], $data['year'] ?? '0000'); - // BUG CORRIGÉ : Utilisation de ON DUPLICATE KEY UPDATE pour ne pas écraser les colonnes comme 'created_at' + // CORRECTION : Utilisation de ON DUPLICATE KEY UPDATE pour préserver les colonnes non listées (ex: created_at) if ($type === 'critique') { $sql = "INSERT INTO critiques (id, title, year, director, poster, rating, review, streaming) VALUES (?, ?, ?, ?, ?, ?, ?, ?) @@ -123,7 +123,7 @@ switch ($action) { } break; - // BUG CORRIGÉ : Ajout de l'endpoint manquant pour l'import CSV + // CORRECTION : Ajout de l'endpoint manquant pour l'import CSV case 'import_csv': checkAuth($pdo); if (isset($_FILES['csv_file'])) {