Add debug logs

This commit is contained in:
2026-07-11 11:17:21 +02:00
parent 7d4de36b10
commit b2787a4b8e
+5 -1
View File
@@ -1,6 +1,10 @@
<?php <?php
// index.php // index.php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
// --- HEADERS CORS (Indispensables pour ton site et ton appli mobile) --- // --- HEADERS CORS (Indispensables pour ton site et ton appli mobile) ---
header("Access-Control-Allow-Origin: *"); header("Access-Control-Allow-Origin: *");
header("Content-Type: application/json; charset=UTF-8"); header("Content-Type: application/json; charset=UTF-8");
@@ -93,7 +97,7 @@ switch ($route) {
$userController->unlink($data); $userController->unlink($data);
} else { http_response_code(405); } } else { http_response_code(405); }
break; break;
case 'add-movie': case 'add-movie':
if ($method === 'POST') { if ($method === 'POST') {
$data['user_id'] = getAuthenticatedUserId($jwt_secret); $data['user_id'] = getAuthenticatedUserId($jwt_secret);