chore: восстановление репозитория из снапшота v0.3.1
Прежняя git-история утрачена при переносе проекта на машину владельца (снапшот без .git). Хэши коммитов в docs/reports/* относятся к утраченной истории. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
commit
1c85091186
184 changed files with 33303 additions and 0 deletions
22
server/api/health.php
Normal file
22
server/api/health.php
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* GET /api/health.php → 200 {"status":"ok"} (V.6).
|
||||
* Проверяет доступность БД; при сбое — 503 без текста исключения.
|
||||
*/
|
||||
|
||||
require __DIR__ . '/../lib/http.php';
|
||||
require __DIR__ . '/../lib/db.php';
|
||||
|
||||
http_security_headers();
|
||||
|
||||
try {
|
||||
method_must('GET');
|
||||
db()->query('SELECT 1');
|
||||
json_out(['status' => 'ok']);
|
||||
} catch (Throwable $e) {
|
||||
error_log('health: ' . $e->getMessage());
|
||||
json_out(['status' => 'error'], 503);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue