diff --git a/src/Controller/DefaultController.php b/src/Controller/DefaultController.php index 8f0a315..ea45797 100644 --- a/src/Controller/DefaultController.php +++ b/src/Controller/DefaultController.php @@ -15,9 +15,14 @@ public function index(): Response $movie = array("id" => 1, "meta" => true, "player" => "tg"); return new JsonResponse($movie); } - #[Route('/api/hello/{name}', name: 'api_hello')] - public function apiHelloword(string $name): Response + #[Route('/api/ask/', name: 'api_ask')] + public function apiAskHello(): Response { return $this->render('default/index.html.twig'); } + #[Route('/api/hello/{name}', name: 'api_name')] + public function apiHello(string $name): Response + { + return new JsonResponse($name); + } }