aboutsummaryrefslogtreecommitdiffstats
path: root/routes
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2014-09-01 15:12:27 -0700
committerAdam Soltys <[email protected]>2014-09-01 15:12:27 -0700
commit40083923ed74eb026135d78600ebf55ff0a9e32c (patch)
treeaf2e75cebeac31ff507615d6608b0c7a84022849 /routes
parent8fe5b97004189845ee98a02ab197ca080ff0a002 (diff)
downloadcoinos-server-40083923ed74eb026135d78600ebf55ff0a9e32c.tar.gz
coinos-server-40083923ed74eb026135d78600ebf55ff0a9e32c.zip
Support BIP32 HD Wallets
Diffstat (limited to 'routes')
-rw-r--r--routes/users.js15
1 files changed, 9 insertions, 6 deletions
diff --git a/routes/users.js b/routes/users.js
index 50db4ec5..2e94f027 100644
--- a/routes/users.js
+++ b/routes/users.js
@@ -18,13 +18,16 @@
});
},
json: function(req, res) {
- return db.hgetall("user:" + req.params.user, function(err, obj) {
- delete obj['password'];
- res.writeHead(200, {
- "Content-Type": "application/json"
+ return db.llen("" + req.params.user + ":transactions", function(err, len) {
+ return db.hgetall("user:" + req.params.user, function(err, obj) {
+ delete obj['password'];
+ obj['index'] = len;
+ res.writeHead(200, {
+ "Content-Type": "application/json"
+ });
+ res.write(JSON.stringify(obj));
+ return res.end();
});
- res.write(JSON.stringify(obj));
- return res.end();
});
},
show: function(req, res) {