aboutsummaryrefslogtreecommitdiffstats
path: root/routes/calculator.js
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/calculator.js
parentf2bff842cbe16c18923b905f70ed168096648727 (diff)
downloadcoinos-server-41f8c6831bb91c0b0be1219b1566e59e48673465.tar.gz
coinos-server-41f8c6831bb91c0b0be1219b1566e59e48673465.zip
Use bower, grunt and browserify instead of connect-assets
Diffstat (limited to 'routes/calculator.js')
-rw-r--r--routes/calculator.js50
1 files changed, 0 insertions, 50 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);