Remove JSON output as we don't use it anymore

This commit is contained in:
Pierre Rudloff 2017-01-16 16:03:31 +01:00
parent ec250b0d05
commit 5e09d8adc7
2 changed files with 0 additions and 27 deletions

View File

@ -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

View File

@ -48,8 +48,4 @@ $app->get(
'/redirect',
[$controller, 'redirect']
)->setName('redirect');
$app->get(
'/json',
[$controller, 'json']
);
$app->run();