Remove JSON output as we don't use it anymore
This commit is contained in:
parent
ec250b0d05
commit
5e09d8adc7
2 changed files with 0 additions and 27 deletions
|
@ -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
|
* Generate the canonical URL of the current page
|
||||||
|
|
|
@ -48,8 +48,4 @@ $app->get(
|
||||||
'/redirect',
|
'/redirect',
|
||||||
[$controller, 'redirect']
|
[$controller, 'redirect']
|
||||||
)->setName('redirect');
|
)->setName('redirect');
|
||||||
$app->get(
|
|
||||||
'/json',
|
|
||||||
[$controller, 'json']
|
|
||||||
);
|
|
||||||
$app->run();
|
$app->run();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue