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]);