seedproject-web/api/public/controllers/admin.php

17 lines
363 B
PHP
Raw Normal View History

<?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'),
]);
}
}