fix names
This commit is contained in:
parent
afca34459c
commit
f4d10adec4
|
@ -36,16 +36,15 @@ exports.show = function(req, res, next) {
|
|||
|
||||
|
||||
|
||||
exports.unspents = function(req, res, next) {
|
||||
exports.utxo = function(req, res, next) {
|
||||
var a = getAddr(req, res, next);
|
||||
|
||||
if (a)
|
||||
a.getUnspents(function(err, unspents) {
|
||||
a.getUtxo(function(err, utxo) {
|
||||
if (err)
|
||||
return common.handleErrors(err, res);
|
||||
else {
|
||||
console.log('[addresses.js.47]', unspents); //TODO
|
||||
return res.jsonp(unspents);
|
||||
return res.jsonp(utxo);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
|
@ -70,7 +70,7 @@ function spec() {
|
|||
}
|
||||
|
||||
|
||||
Address.prototype.getUnspents = function(next) {
|
||||
Address.prototype.getUtxo = function(next) {
|
||||
var self = this;
|
||||
if (!self.addrStr) return next();
|
||||
|
||||
|
|
|
@ -21,8 +21,8 @@ module.exports = function(app) {
|
|||
|
||||
// Address routes
|
||||
var addresses = require('../app/controllers/addresses');
|
||||
// app.get('/api/addr/:addr', addresses.show);
|
||||
app.get('/api/addr/:addr/unspents', addresses.unspents);
|
||||
app.get('/api/addr/:addr', addresses.show);
|
||||
app.get('/api/addr/:addr/utxo', addresses.utxo);
|
||||
|
||||
// Status route
|
||||
var st = require('../app/controllers/status');
|
||||
|
|
Loading…
Reference in New Issue