Actualiser api.php
This commit is contained in:
@@ -913,6 +913,18 @@ case 'add_item_by_ean':
|
||||
$data = json_decode(file_get_contents("php://input"), true);
|
||||
$ean = $data['ean'] ?? '';
|
||||
|
||||
// LOG : EAN traité
|
||||
error_log("--- DÉBUT RECHERCHE EAN : $ean ---");
|
||||
|
||||
// 1. Test UpcIndex
|
||||
$titleUpc = fetchFromUpcIndex($ean);
|
||||
error_log("UpcIndex a trouvé : " . ($titleUpc ?? 'RIEN'));
|
||||
|
||||
// 2. Test Blu-ray.com
|
||||
$blurayData = fetchFromBlurayCom($ean);
|
||||
error_log("Blu-ray.com a trouvé : " . ($blurayData['title'] ?? 'RIEN'));
|
||||
$ean = $data['ean'] ?? '';
|
||||
|
||||
// 1. Récupération via UpcIndex (Priorité 1)
|
||||
$title = fetchFromUpcIndex($ean);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user