Skip to content

Commit

Permalink
Recognize getcoinsupply
Browse files Browse the repository at this point in the history
  • Loading branch information
dajohi committed Feb 17, 2016
1 parent e61d3b6 commit 52fc02e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/controllers/status.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ exports.show = function(req, res) {
};

switch(option) {
case 'getCoinSupply':
statusObject.getCoinSupply(returnJsonp);
break;
case 'getDifficulty':
statusObject.getDifficulty(returnJsonp);
break;
Expand Down
16 changes: 16 additions & 0 deletions app/models/Status.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,22 @@ Status.prototype.getInfo = function(next) {
});
};

Status.prototype.getCoinSupply = function(next) {
var that = this;
async.series([
function (cb) {
rpc.getCoinSupply(function(err, cs){
if (err) return cb(err);

that.coinsupply = cs.result;
return cb();
});
}
], function (err) {
return next(err);
});
};

Status.prototype.getDifficulty = function(next) {
var that = this;
async.series([
Expand Down

0 comments on commit 52fc02e

Please sign in to comment.