fix state name

This commit is contained in:
Matias Alejo Garcia 2015-05-27 08:51:25 -03:00
parent df9a148278
commit d52cf70765
3 changed files with 27 additions and 34 deletions

View File

@ -14,7 +14,7 @@ var tDb = require('../../lib/TransactionDb').default();
var checkSync = function(req, res) { var checkSync = function(req, res) {
if (req.historicSync) { if (req.historicSync) {
var i = req.historicSync.info() var i = req.historicSync.info()
if (i.status !== 'complete') { if (i.status !== 'finished') {
common.notReady(req, res, i.syncPercentage); common.notReady(req, res, i.syncPercentage);
return false; return false;
} }

View File

@ -12,10 +12,6 @@ var Status = require('../models/Status'),
*/ */
exports.show = function(req, res) { exports.show = function(req, res) {
if (! req.query.q) {
res.status(400).send('Bad Request');
}
else {
var option = req.query.q; var option = req.query.q;
var statusObject = new Status(); var statusObject = new Status();
@ -28,9 +24,6 @@ exports.show = function(req, res) {
}; };
switch(option) { switch(option) {
case 'getInfo':
statusObject.getInfo(returnJsonp);
break;
case 'getDifficulty': case 'getDifficulty':
statusObject.getDifficulty(returnJsonp); statusObject.getDifficulty(returnJsonp);
break; break;
@ -43,9 +36,9 @@ exports.show = function(req, res) {
case 'getBestBlockHash': case 'getBestBlockHash':
statusObject.getBestBlockHash(returnJsonp); statusObject.getBestBlockHash(returnJsonp);
break; break;
case 'getInfo':
default: default:
res.status(400).send('Bad Request'); statusObject.getInfo(returnJsonp);
}
} }
}; };

View File

@ -1,7 +1,7 @@
{ {
"name": "insight-bitcore-api", "name": "insight-bitcore-api",
"description": "An open-source bitcoin blockchain API. The Insight API provides you with a convenient, powerful and simple way to query and broadcast data on the bitcoin network and build your own services with it.", "description": "An open-source bitcoin blockchain API. The Insight API provides you with a convenient, powerful and simple way to query and broadcast data on the bitcoin network and build your own services with it.",
"version": "0.2.12", "version": "0.2.13",
"author": { "author": {
"name": "Ryan X Charles", "name": "Ryan X Charles",
"email": "ryan@bitpay.com" "email": "ryan@bitpay.com"