diff options
| author | Adam Soltys <[email protected]> | 2014-07-31 21:06:23 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2014-07-31 21:06:23 -0700 |
| commit | 7c5dfc8d51efe4df4e67f86f33c489a320fcb8f9 (patch) | |
| tree | f387c3d4e3ce9ed0c464659a787b99d8c6e90fb9 /routes/calculator.coffee | |
| parent | de1cdd2e3f9d9f36ce3d8e97335341cc3237e829 (diff) | |
| download | coinos-server-7c5dfc8d51efe4df4e67f86f33c489a320fcb8f9.tar.gz coinos-server-7c5dfc8d51efe4df4e67f86f33c489a320fcb8f9.zip | |
Move coffee files to src/ folder
Diffstat (limited to 'routes/calculator.coffee')
| -rw-r--r-- | routes/calculator.coffee | 28 |
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() - ) - |
