fix chainquery endpoint
This commit is contained in:
parent
8c6c576a31
commit
33ac4fab0c
3 changed files with 7 additions and 7 deletions
|
@ -222,7 +222,7 @@ return [
|
|||
'className' => 'Cake\Database\Connection',
|
||||
'driver' => 'Cake\Database\Driver\Mysql',
|
||||
'persistent' => false,
|
||||
'host' => 'chainquery.lbry.io',
|
||||
'host' => 'chainquery.lbry.com',
|
||||
/**
|
||||
* CakePHP will use the default DB port based on the driver selected
|
||||
* MySQL on MAMP uses port 8889, MAMP users will want to uncomment
|
||||
|
@ -257,9 +257,9 @@ return [
|
|||
*/
|
||||
//'init' => ['SET GLOBAL innodb_stats_on_metadata = 0'],
|
||||
|
||||
'url' => env('DATABASE_URL', 'chainquery.lbry.io:3600'),
|
||||
'url' => env('DATABASE_URL', 'chainquery.lbry.com:3600'),
|
||||
],
|
||||
|
||||
|
||||
'localdb' => [ // Local db for price history
|
||||
'className' => 'Cake\Database\Connection',
|
||||
'driver' => 'Cake\Database\Driver\Mysql',
|
||||
|
|
|
@ -38,7 +38,7 @@ function buildChartData(claimsData) {
|
|||
}
|
||||
|
||||
function loadChartData() {
|
||||
var api_url = "https://chainquery.lbry.io/api/sql?query=";
|
||||
var api_url = "https://chainquery.lbry.com/api/sql?query=";
|
||||
var query = "SELECT c1.claim_type, c1.bid_state, c1.effective_amount, c1.transaction_time, o.transaction_time AS 'spent_time' FROM claim c1 LEFT JOIN (SELECT output.claim_id, tx.transaction_time FROM output INNER JOIN input ON input.prevout_hash = output.transaction_hash AND input.prevout_n = output.vout INNER JOIN transaction tx ON tx.id = input.transaction_id) o ON o.claim_id=c1.claim_id AND c1.bid_state='Spent' ORDER BY c1.transaction_time ASC";
|
||||
var url = api_url + query;
|
||||
var loadProgress = $('.bids-chart-container .load-progress');
|
||||
|
@ -167,4 +167,4 @@ divId: 'chart-export'
|
|||
}
|
||||
});
|
||||
loadChartData();
|
||||
});
|
||||
});
|
||||
|
|
|
@ -97,7 +97,7 @@ function buildChartData(blockData) {
|
|||
}
|
||||
|
||||
function loadChartData() {
|
||||
var api_url = "https://chainquery.lbry.io/api/sql?query=";
|
||||
var api_url = "https://chainquery.lbry.com/api/sql?query=";
|
||||
var query = "SELECT height, block_time FROM block WHERE confirmations > 0 ORDER BY height";
|
||||
var url = api_url + query;
|
||||
var loadProgress = $('.mining-inflation-chart-container .load-progress');
|
||||
|
@ -261,4 +261,4 @@ divId: 'chart-export'
|
|||
}
|
||||
});
|
||||
loadChartData();
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue