mirror of
https://github.com/seigler/cryptohistory.org
synced 2025-07-27 01:36:11 +00:00
⚡ Change data API from Poloniex to CryptoCompare.com
This commit is contained in:
parent
a6784a0240
commit
5ebec31d80
3 changed files with 93 additions and 79 deletions
|
@ -18,7 +18,7 @@ $router->map('GET', '/', function() {
|
|||
});
|
||||
|
||||
// map cryptocurrency stuff
|
||||
$router->map( 'GET', '/charts/[dark|light|sparkline|candlestick|filled:theme]/[a:curA]-[btc|usdt:curB]/[a:duration]/[svg|png:format]', function($theme, $curA, $curB, $duration, $format) {
|
||||
$router->map( 'GET', '/charts/[dark|light|sparkline|candlestick|filled:theme]/[a:curA]-[a:curB]/[a:duration]/[svg|png:format]', function($theme, $curA, $curB, $duration, $format) {
|
||||
require __DIR__ . '/views/chart.php';
|
||||
return renderChart(
|
||||
$theme,
|
||||
|
@ -38,11 +38,5 @@ if( !$match || !is_callable( $match['target'] ) || false === call_user_func_arra
|
|||
header( $_SERVER["SERVER_PROTOCOL"] . ' 404 Not Found');
|
||||
echo '<h1>404 Not Found</h1><p>Page not found</p>';
|
||||
}
|
||||
try {
|
||||
} catch (Exception $e) {
|
||||
header($_SERVER["SERVER_PROTOCOL"]." 500 Server Error", true, 500);
|
||||
echo '<h1>500 Server Error</h1><p>There was a problem generating this page</p>';
|
||||
return true;
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue