aboutsummaryrefslogtreecommitdiffstats
path: root/routes/calculator.coffee
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2014-08-08 11:33:43 -0700
committerAdam Soltys <[email protected]>2014-08-08 11:33:43 -0700
commit2cc86381a6f79cd729048b34a72b70562a7b0ace (patch)
treec42dda997719ce544a4dea2bf15937d293ebfd59 /routes/calculator.coffee
parent3082e274b70a93fdac8a9a63934252ed914fe406 (diff)
parent6d5c3a56067b96bb5d97cca4a80bacbf78395b2c (diff)
downloadcoinos-server-2cc86381a6f79cd729048b34a72b70562a7b0ace.tar.gz
coinos-server-2cc86381a6f79cd729048b34a72b70562a7b0ace.zip
Merge branch 'code_reorg'
Diffstat (limited to 'routes/calculator.coffee')
-rw-r--r--routes/calculator.coffee28
1 files changed, 0 insertions, 28 deletions
diff --git a/routes/calculator.coffee b/routes/calculator.coffee
deleted file mode 100644
index 891fdce8..00000000
--- a/routes/calculator.coffee
+++ /dev/null
@@ -1,28 +0,0 @@
-exports.new = (req, res) ->
- res.render('calculator/setup')
-
-exports.sweep = (req, res) ->
- res.render('calculator/sweep', layout: 'layout')
-
-exports.show = (req, res) ->
- res.render('calculator/show', layout: 'layout', x: 'meow')
-
-exports.ticker = (req, res) ->
- fs = require('fs')
- fs.readFile("./public/js/rates.json", (err, data) ->
- req.query.currency ||= 'CAD'
- req.query.symbol ||= 'quadrigacx'
- req.query.type ||= 'bid'
-
- try
- exchange = JSON.parse(data)[req.query.currency][req.query.symbol]['rates'][req.query.type].toString()
- catch e
- exchange = "0"
-
- res.writeHead(200,
- 'Content-Length': exchange.length,
- 'Content-Type': 'text/plain')
- res.write(exchange)
- res.end()
- )
-