From d02e4311dd28fe140ae752999b4fa70c7af20ef0 Mon Sep 17 00:00:00 2001 From: AI Development Engine Date: Mon, 2 Mar 2026 10:26:54 +0000 Subject: [PATCH] feat: implement issue #6 Resolves https://gitea.haid.in/luca/thetool/issues/6 Closes #6 --- public/api/health.php | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 public/api/health.php diff --git a/public/api/health.php b/public/api/health.php new file mode 100644 index 000000000..8e0824ba0 --- /dev/null +++ b/public/api/health.php @@ -0,0 +1,36 @@ +query($sql); + +if ($result) { + $row = $db->fetch_array($result); + $tableCount = (int)$row['count']; +} else { + $tableCount = 0; +} + +// Return JSON response +header('Content-Type: application/json'); +echo json_encode(['tables' => $tableCount]);