Прежняя git-история утрачена при переносе проекта на машину владельца (снапшот без .git). Хэши коммитов в docs/reports/* относятся к утраченной истории. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
24 lines
431 B
PHP
24 lines
431 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
/**
|
|
* GET /api/me.php → 200 {email} | 401.
|
|
*/
|
|
|
|
require __DIR__ . '/../lib/http.php';
|
|
require __DIR__ . '/../lib/db.php';
|
|
require __DIR__ . '/../lib/auth.php';
|
|
|
|
http_security_headers();
|
|
|
|
try {
|
|
method_must('GET');
|
|
|
|
$user = require_user(db());
|
|
|
|
json_out(['email' => $user['email']]);
|
|
} catch (Throwable $e) {
|
|
error_log('me: ' . $e->getMessage());
|
|
error_out(500, 'internal');
|
|
}
|