aboutsummaryrefslogtreecommitdiffstats
path: root/public
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2012-11-12 22:43:39 -0800
committerAdam Soltys <[email protected]>2012-11-12 22:43:39 -0800
commit5bba3395bc0bb84dcd24a7ade0c855a6beb6dbef (patch)
tree47507cd021c87c6e13eb9931ced40f570c5c5fe7 /public
parent28575e4e34117a01390d49701fe4e2e0fe3f7ce9 (diff)
downloadcoinos-server-5bba3395bc0bb84dcd24a7ade0c855a6beb6dbef.tar.gz
coinos-server-5bba3395bc0bb84dcd24a7ade0c855a6beb6dbef.zip
Save transactions in redis
Diffstat (limited to 'public')
-rw-r--r--public/js/calculator.coffee16
1 files changed, 8 insertions, 8 deletions
diff --git a/public/js/calculator.coffee b/public/js/calculator.coffee
index 6861bb16..01523d9a 100644
--- a/public/js/calculator.coffee
+++ b/public/js/calculator.coffee
@@ -7,7 +7,7 @@ g = exports ? this
$(->
g.websocket = null
- g.client = $('#client').val()
+ g.user = $('#user').val()
g.title = get('title')
g.address = get('address')
g.commission = get('commission')
@@ -18,8 +18,8 @@ $(->
setupQR()
setupSocket()
- if client? and client
- $.getJSON('client/' + client, (data) ->
+ if user? and user
+ $.getJSON(user + '.json', (data) ->
g.title = data.name
g.address = data.address
g.commission = data.commission
@@ -124,11 +124,11 @@ setupSocket = ->
$('#payment').hide()
$('#received').fadeIn('slow')
- $.get('record_transaction.php',
- address: from_address,
- date: moment().format("YYYY-MM-DD HH:mm:ss"),
- received: received,
- exchange: g.exchange
+ $.post("/#{g.user}/transactions",
+ address: from_address,
+ date: moment().format("YYYY-MM-DD HH:mm:ss"),
+ received: received,
+ exchange: g.exchange
)
get = (name) ->