Initial commit BIJ CI4
This commit is contained in:
28
app/Controllers/Api/Admin/ReferenceController.php
Normal file
28
app/Controllers/Api/Admin/ReferenceController.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Controllers\Api\Admin;
|
||||
|
||||
use CodeIgniter\HTTP\ResponseInterface;
|
||||
|
||||
class ReferenceController extends BaseAdminApiController
|
||||
{
|
||||
public function index(): ResponseInterface
|
||||
{
|
||||
$auth = $this->requireAdminApiAccess('references');
|
||||
if ($auth['response'] !== null) {
|
||||
return $auth['response'];
|
||||
}
|
||||
$cb = $this->cabangKantorAfterAuth($auth['actor']);
|
||||
if ($cb['response'] !== null) {
|
||||
return $cb['response'];
|
||||
}
|
||||
|
||||
$this->auditAuthorized('api.admin.references.index', $auth['actor'], [
|
||||
'request' => $this->auditRequestParams(),
|
||||
]);
|
||||
|
||||
return $this->respond($this->adminApi->references($cb['kid']));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user