From 65f7ab95cfc2708cbd064744b5e5674cd85e9e2a Mon Sep 17 00:00:00 2001 From: Ifrim Alexandra <157494822+ale23yfm@users.noreply.github.com> Date: Thu, 2 Jul 2026 17:47:39 +0300 Subject: [PATCH] Update index.php --- v1/cleanjobs/index.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/v1/cleanjobs/index.php b/v1/cleanjobs/index.php index 25e28df..e77dfbc 100644 --- a/v1/cleanjobs/index.php +++ b/v1/cleanjobs/index.php @@ -168,6 +168,17 @@ function solrEscape(string $value): string { // Parse body - support JSON and form-encoded $rawBody = file_get_contents('php://input'); $contentType = $_SERVER['CONTENT_TYPE'] ?? ''; + + error_log( + "CLEANJOBS REQUEST | IP=" . + ($_SERVER['REMOTE_ADDR'] ?? '-') . + " | METHOD=" . + ($_SERVER['REQUEST_METHOD'] ?? '-') . + " | URI=" . + ($_SERVER['REQUEST_URI'] ?? '-') . + " | BODY=" . + $rawBody + ); if (strpos($contentType, 'application/json') !== false) { $body = json_decode($rawBody, true); @@ -297,6 +308,10 @@ function solrEscape(string $value): string { $countResponse = fetchJson($countUrl, $SOLR_USER, $SOLR_PASS, 4); $jobCount = $countResponse['response']['numFound'] ?? 0; + error_log( + "CLEANJOBS DELETE | QUERY=$query | JOBS=$jobCount" + ); + if ($jobCount === 0) { http_response_code(404); echo json_encode([