17 lines
363 B
PHP
17 lines
363 B
PHP
|
|
<?php
|
||
|
|
use App\Controllers\ApiController;
|
||
|
|
|
||
|
|
/** GET /api/admin/ping — privileged round-trip. */
|
||
|
|
class Admin extends ApiController
|
||
|
|
{
|
||
|
|
public function ping()
|
||
|
|
{
|
||
|
|
$this->requireAuth();
|
||
|
|
$this->json([
|
||
|
|
'pong' => true,
|
||
|
|
'auth' => $this->apiUser ? 'apikey' : 'admin_token',
|
||
|
|
'time' => date('c'),
|
||
|
|
]);
|
||
|
|
}
|
||
|
|
}
|