new kernel, ms bearer

This commit is contained in:
2024-10-23 16:16:47 +03:00
parent 5285acae12
commit 2470c5dba8
62 changed files with 892 additions and 105 deletions

View File

@ -101,6 +101,12 @@ class RestController
$this->renderApi($model->toArray());
}
#[NoReturn] public function returnError(int $code): void
{
http_response_code($code);
die('Forbidden');
}
#[NoReturn] protected function renderApi(array $data): void
{
header("Content-Type: application/json");
@ -108,4 +114,6 @@ class RestController
exit();
}
}