fix names

This commit is contained in:
Matias Alejo Garcia 2014-02-20 10:54:02 -03:00
parent afca34459c
commit f4d10adec4
3 changed files with 6 additions and 7 deletions

View File

@ -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); var a = getAddr(req, res, next);
if (a) if (a)
a.getUnspents(function(err, unspents) { a.getUtxo(function(err, utxo) {
if (err) if (err)
return common.handleErrors(err, res); return common.handleErrors(err, res);
else { else {
console.log('[addresses.js.47]', unspents); //TODO return res.jsonp(utxo);
return res.jsonp(unspents);
} }
}); });
}; };

View File

@ -70,7 +70,7 @@ function spec() {
} }
Address.prototype.getUnspents = function(next) { Address.prototype.getUtxo = function(next) {
var self = this; var self = this;
if (!self.addrStr) return next(); if (!self.addrStr) return next();

View File

@ -21,8 +21,8 @@ module.exports = function(app) {
// Address routes // Address routes
var addresses = require('../app/controllers/addresses'); var addresses = require('../app/controllers/addresses');
// app.get('/api/addr/:addr', addresses.show); app.get('/api/addr/:addr', addresses.show);
app.get('/api/addr/:addr/unspents', addresses.unspents); app.get('/api/addr/:addr/utxo', addresses.utxo);
// Status route // Status route
var st = require('../app/controllers/status'); var st = require('../app/controllers/status');