20 lines
479 B
PHP
20 lines
479 B
PHP
<?php
|
|
require __DIR__ . '/_bootstrap.php';
|
|
|
|
/**
|
|
* @OA\Get(
|
|
* path="/me.php",
|
|
* tags={"Auth"},
|
|
* summary="Current user",
|
|
* security={{"bearerAuth":{}}},
|
|
* @OA\Response(response=200, description="OK", @OA\JsonContent(
|
|
* @OA\Property(property="data", ref="#/components/schemas/User")
|
|
* )),
|
|
* @OA\Response(response=401, ref="#/components/responses/Unauthorized")
|
|
* )
|
|
*/
|
|
require_method('GET');
|
|
$user = require_auth($pdo);
|
|
|
|
json_data(present_user($user));
|