fixed api adress

This commit is contained in:
Lee Wong 2017-03-26 16:59:40 +07:00 committed by tungfa
parent 36201af103
commit fe26778698

View file

@ -2,13 +2,13 @@
'use strict'; 'use strict';
$(document).ready(function () { $(document).ready(function () {
var siteApi = window.globals.siteApi || '/api/v1/'; var siteApi = window.globals.siteApi || '/api/v1';
if ($('#blocks').length) { if ($('#blocks').length) {
// Get the blockchain info // Get the blockchain info
$.ajax({ $.ajax({
url: siteApi + 'chain/latestBlocks/' url: siteApi + '/chain/latestBlocks/'
}) })
.done(function(response) { .done(function(response) {
var blocks = response.blocks; var blocks = response.blocks;
@ -29,7 +29,7 @@
// Get the exchange data // Get the exchange data
$.ajax({ $.ajax({
url: siteApi + 'exchange/', url: siteApi + '/exchange/',
error: function(jqXHR, textStatus, errorThrown) { error: function(jqXHR, textStatus, errorThrown) {
console.log(jqXHR); console.log(jqXHR);
console.log(textStatus); console.log(textStatus);
@ -58,7 +58,7 @@
// Get the current number of masternodes. // Get the current number of masternodes.
$.ajax({ $.ajax({
url: siteApi + 'masternodes/stats/' url: siteApi + '/masternodes/stats/'
}) })
.done(function(response) { .done(function(response) {
console.log('masternode stats', response.stats); console.log('masternode stats', response.stats);
@ -74,7 +74,7 @@
// Get the budget proposals // Get the budget proposals
$.ajax({ $.ajax({
url: siteApi + 'budgets/' url: siteApi + '/budgets/'
}) })
.done(function(response) { .done(function(response) {
var proposals = response.proposals; var proposals = response.proposals;