Add Remove & Mark watched movie

This commit is contained in:
2026-07-11 14:08:44 +02:00
parent 535fe6041b
commit 72d563416b
2 changed files with 35 additions and 4 deletions
+14
View File
@@ -119,6 +119,20 @@ switch ($route) {
} else { http_response_code(405); }
break;
case 'remove-movie':
if ($method === 'POST') {
$data['user_id'] = getAuthenticatedUserId($jwt_secret);
$movieController->remove($data);
} else { http_response_code(405); }
break;
case 'mark-watched':
if ($method === 'POST') {
$data['user_id'] = getAuthenticatedUserId($jwt_secret);
$movieController->markWatched($data);
} else { http_response_code(405); }
break;
default:
http_response_code(404);
echo json_encode(["error" => "Route /" . $route . " non trouvée"]);