From 9a4106a2018245cc987a477f8e9f95b6d4e297b0 Mon Sep 17 00:00:00 2001 From: mirivlad Date: Tue, 14 Apr 2026 00:52:53 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=D0=B8=D1=81=D0=BF=D1=80=D0=B0=D0=B2?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=20=D1=81=D0=B8=D0=BD=D1=82=D0=B0=D0=BA=D1=81?= =?UTF-8?q?=D0=B8=D1=81=20index.php=20=D0=B8=20=D0=B4=D0=BE=D0=B1=D0=B0?= =?UTF-8?q?=D0=B2=D0=BB=D0=B5=D0=BD=20API=20=D0=BC=D0=B0=D1=80=D1=88=D1=80?= =?UTF-8?q?=D1=83=D1=82=20=D0=B4=D0=B0=D1=88=D0=B1=D0=BE=D1=80=D0=B4=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Восстановлен корректный index.php из чистого коммита - Добавлен маршрут /api/dashboard/stats для бесшовного обновления - Исправлена ошибка парсинга PHP --- public/index.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/public/index.php b/public/index.php index 2e304dd..2cffc0b 100755 --- a/public/index.php +++ b/public/index.php @@ -141,9 +141,6 @@ $dashboardGroup = $app->group('', function ($group) use ($twig) { return $twig->render($response, 'dashboard.twig', $templateData); }); })->add($csrfMiddleware)->add(AuthMiddleware::class); -n// API для дашборда - = new DashboardController(); -->get('/api/dashboard/stats', [, 'getDashboardData']); // Create controllers BEFORE routes $groupController = new GroupController($twig); @@ -154,6 +151,11 @@ $adminController = new AdminController($twig); $metricsController = new MetricsController(); $agentController = new AgentController(); + +// API для дашборда +$dashboardApiController = new DashboardController($twig); +$app->get('/api/dashboard/stats', [$dashboardApiController, 'getDashboardData'])->add(AuthMiddleware::class); + // Routes for groups (protected with auth middleware and csrf) $groupsGroup = $app->group('/groups', function ($group) use ($groupController) { $group->get('', [$groupController, 'index']);