diff --git a/src/Controller/HomeController.php b/src/Controller/HomeController.php index e2899a3c6a9f0093d97e12006f657dd4742347ee..708cb5ee521d5be08b2d9fb4f587ecfb2f0ab550 100644 --- a/src/Controller/HomeController.php +++ b/src/Controller/HomeController.php @@ -7,6 +7,7 @@ use App\Validation\{ArrayValidation, DateValidation}; use DateTimeImmutable; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Routing\Attribute\Route; @@ -87,7 +88,7 @@ class HomeController extends AbstractController return $this->json($fridays); } - #[Route('/func7/{startDate}/{endDate}', name: 'home')] // 01-01-2024 + #[Route('/func7/{startDate}/{endDate}', name: 'func7')] // 01-01-2024 public function func7(string $startDate, string $endDate): Response { if (DateValidation::validate($startDate) && DateValidation::validate($endDate)) { @@ -104,8 +105,8 @@ class HomeController extends AbstractController return new Response("Invalid date format"); } - #[Route('/{fileName}', name: 'home')] - public function home(string $fileName): Response // text.txt + #[Route('/func8/{fileName}', name: 'func8')] + public function func8(string $fileName): Response // text.txt { $filePath = $this->getParameter('kernel.project_dir') . "/public/files/"; $text = $this->functions->readLogFile($filePath . $fileName);