aboutsummaryrefslogtreecommitdiffstats
path: root/routes
diff options
context:
space:
mode:
Diffstat (limited to 'routes')
-rw-r--r--routes/transactions.js4
-rw-r--r--routes/users.js2
2 files changed, 5 insertions, 1 deletions
diff --git a/routes/transactions.js b/routes/transactions.js
index 28fd2418..759ec14a 100644
--- a/routes/transactions.js
+++ b/routes/transactions.js
@@ -25,6 +25,10 @@
};
return db.lrange("" + user + ":transactions", 0, -1, function(err, transactions) {
var cb, i, txid;
+ if (err || !transactions.length) {
+ res.write(JSON.stringify(r));
+ return res.end();
+ }
txid = function() {
var x;
x = transactions[i++];
diff --git a/routes/users.js b/routes/users.js
index 37ce9774..46a8f8f8 100644
--- a/routes/users.js
+++ b/routes/users.js
@@ -121,7 +121,7 @@
if (host === 'localhost') {
host += ':3000';
}
- url = "" + req.protocol + "://" + req.hostname + ":3000/verify/" + token;
+ url = "" + req.protocol + "://" + host + "/verify/" + token;
return res.render('users/welcome', {
user: req.params.user,
layout: 'mail',