Роуты /api/ и некоторые мелочи по контроллерам

This commit is contained in:
2025-07-19 21:20:30 +08:00
parent 36c3570e05
commit 5c4554b9f9
6 changed files with 36 additions and 42 deletions

View File

@@ -34,7 +34,7 @@ class BasicController
*/
public function notFound(ServerRequestInterface $request, ResponseInterface $response): ResponseInterface
{
$code = $request->getAttributes()['code'];
$code = $request->getAttributes()['code'] ?? '';
$response->withStatus(404);
$this->view($request, $response, 'notfound.twig', ['code' => $code]);