From f4d10adec48263fc264bdb690fe8d4e18760c475 Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Thu, 20 Feb 2014 10:54:02 -0300 Subject: [PATCH] fix names --- app/controllers/addresses.js | 7 +++---- app/models/Address.js | 2 +- config/routes.js | 4 ++-- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/app/controllers/addresses.js b/app/controllers/addresses.js index c7347c0..c94779b 100644 --- a/app/controllers/addresses.js +++ b/app/controllers/addresses.js @@ -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); } }); }; diff --git a/app/models/Address.js b/app/models/Address.js index f68e08d..45995d9 100644 --- a/app/models/Address.js +++ b/app/models/Address.js @@ -70,7 +70,7 @@ function spec() { } - Address.prototype.getUnspents = function(next) { + Address.prototype.getUtxo = function(next) { var self = this; if (!self.addrStr) return next(); diff --git a/config/routes.js b/config/routes.js index f480d7e..163d716 100644 --- a/config/routes.js +++ b/config/routes.js @@ -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');