diff --git a/controllers/FrontController.php b/controllers/FrontController.php index 649a061..a9d9115 100644 --- a/controllers/FrontController.php +++ b/controllers/FrontController.php @@ -348,29 +348,6 @@ class FrontController } } - /** - * Output JSON info about the video. - * - * @param Request $request PSR-7 request - * @param Response $response PSR-7 response - * - * @return Response HTTP response - */ - public function json(Request $request, Response $response) - { - $params = $request->getQueryParams(); - if (isset($params['url'])) { - try { - $video = $this->download->getJSON($params['url']); - - return $response->withJson($video); - } catch (\Exception $e) { - return $response->withJson( - ['success' => false, 'error' => $e->getMessage()] - ); - } - } - } /** * Generate the canonical URL of the current page diff --git a/index.php b/index.php index fad0bb0..b3b77de 100644 --- a/index.php +++ b/index.php @@ -48,8 +48,4 @@ $app->get( '/redirect', [$controller, 'redirect'] )->setName('redirect'); -$app->get( - '/json', - [$controller, 'json'] -); $app->run();