aboutsummaryrefslogtreecommitdiffstats
path: root/routes
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2015-11-28 23:57:34 -0800
committerAdam Soltys <[email protected]>2015-11-30 21:10:59 -0800
commit41f8c6831bb91c0b0be1219b1566e59e48673465 (patch)
tree39626cf1a8fe7b8d73f750ccaf433bfa8c425d6b /routes
parentf2bff842cbe16c18923b905f70ed168096648727 (diff)
downloadcoinos-server-41f8c6831bb91c0b0be1219b1566e59e48673465.tar.gz
coinos-server-41f8c6831bb91c0b0be1219b1566e59e48673465.zip
Use bower, grunt and browserify instead of connect-assets
Diffstat (limited to 'routes')
-rw-r--r--routes/calculator.js50
-rw-r--r--routes/users.js8
2 files changed, 5 insertions, 53 deletions
diff --git a/routes/calculator.js b/routes/calculator.js
deleted file mode 100644
index 96799be9..00000000
--- a/routes/calculator.js
+++ /dev/null
@@ -1,50 +0,0 @@
-(function() {
- exports.address = function(req, res) {
- return res.render('calculator/address', {
- layout: 'layout',
- js: (function() {
- return global.js;
- }),
- css: (function() {
- return global.css;
- })
- });
- };
-
- exports.sweep = function(req, res) {
- return res.render('calculator/sweep', {
- layout: 'layout',
- navigation: true,
- js: (function() {
- return global.js;
- }),
- css: (function() {
- return global.css;
- })
- });
- };
-
- exports.ticker = function(req, res) {
- var fs;
- fs = require('fs');
- return fs.readFile("./public/js/rates.json", function(err, data) {
- var e, exchange, _base, _base1, _base2;
- (_base = req.query).currency || (_base.currency = 'CAD');
- (_base1 = req.query).symbol || (_base1.symbol = 'quadrigacx');
- (_base2 = req.query).type || (_base2.type = 'bid');
- try {
- exchange = JSON.parse(data)[req.query.currency][req.query.symbol]['rates'][req.query.type].toString();
- } catch (_error) {
- e = _error;
- exchange = "0";
- }
- res.writeHead(200, {
- 'Content-Length': exchange.length,
- 'Content-Type': 'text/plain'
- });
- res.write(exchange);
- return res.end();
- });
- };
-
-}).call(this);
diff --git a/routes/users.js b/routes/users.js
index 736caa6a..9dc9c801 100644
--- a/routes/users.js
+++ b/routes/users.js
@@ -56,7 +56,7 @@
}
if (obj.logo && obj.logo.length > 3) {
ext = obj.logo.substr(obj.logo.length - 3);
- path = "public/assets/img/logos/" + obj.username + "." + ext;
+ path = "public/img/logos/" + obj.username + "." + ext;
fs.lstat(path, function(err, stats) {
if ((ext === 'jpg' || ext === 'png' || ext === 'gif') && (err || !stats.isFile())) {
try {
@@ -204,7 +204,8 @@
password: hash
}, function() {
if (req.xhr) {
- return res.send({});
+ res.send({});
+ return res.end();
} else {
return res.redirect("/" + req.params.user);
}
@@ -212,7 +213,8 @@
});
} else {
if (req.xhr) {
- return res.send({});
+ res.send({});
+ return res.end();
} else {
return res.redirect("/" + req.params.user);
}