fix chainquery endpoint

This commit is contained in:
Niko Storni 2019-12-11 17:28:14 +01:00
parent 8c6c576a31
commit 33ac4fab0c
3 changed files with 7 additions and 7 deletions

View file

@ -222,7 +222,7 @@ return [
'className' => 'Cake\Database\Connection', 'className' => 'Cake\Database\Connection',
'driver' => 'Cake\Database\Driver\Mysql', 'driver' => 'Cake\Database\Driver\Mysql',
'persistent' => false, 'persistent' => false,
'host' => 'chainquery.lbry.io', 'host' => 'chainquery.lbry.com',
/** /**
* CakePHP will use the default DB port based on the driver selected * CakePHP will use the default DB port based on the driver selected
* MySQL on MAMP uses port 8889, MAMP users will want to uncomment * MySQL on MAMP uses port 8889, MAMP users will want to uncomment
@ -257,7 +257,7 @@ return [
*/ */
//'init' => ['SET GLOBAL innodb_stats_on_metadata = 0'], //'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 'localdb' => [ // Local db for price history

View file

@ -38,7 +38,7 @@ function buildChartData(claimsData) {
} }
function loadChartData() { 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 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 url = api_url + query;
var loadProgress = $('.bids-chart-container .load-progress'); var loadProgress = $('.bids-chart-container .load-progress');

View file

@ -97,7 +97,7 @@ function buildChartData(blockData) {
} }
function loadChartData() { 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 query = "SELECT height, block_time FROM block WHERE confirmations > 0 ORDER BY height";
var url = api_url + query; var url = api_url + query;
var loadProgress = $('.mining-inflation-chart-container .load-progress'); var loadProgress = $('.mining-inflation-chart-container .load-progress');