summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAzul <azul@riseup.net>2012-10-30 15:09:13 +0100
committerAzul <azul@riseup.net>2012-10-30 15:10:55 +0100
commit3bf101bc1ef3b5a58fe2f1e2a2e7a681f6de6c09 (patch)
tree02a05bd7006c68c85aa870b3134490d087b0ab8e /src
parent6feb77060140fe8026812970c4d5ea83da3cd200 (diff)
we're expecting json responses - so put .json in the url
Diffstat (limited to 'src')
-rw-r--r--src/jqueryRest.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/jqueryRest.js b/src/jqueryRest.js
index f50080b..133e3fd 100644
--- a/src/jqueryRest.js
+++ b/src/jqueryRest.js
@@ -54,7 +54,7 @@ jqueryRest = function() {
function sendVerifier(session, callback) {
var salt = session.getSalt();
- $.post("users", { user:
+ $.post("users.json", { user:
{ login: session.getI(),
password_salt: salt,
password_verifier: session.getV(salt).toString(16)}
@@ -62,13 +62,13 @@ jqueryRest = function() {
}
function handshake(session, callback) {
- $.post("sessions", { login: session.getI(),
+ $.post("sessions.json", { login: session.getI(),
A: session.getAstr()}, callback);
}
function authenticate(session, success) {
$.ajax({
- url: "sessions/" + session.getI(),
+ url: "sessions/" + session.getI() + ".json",
type: 'PUT',
data: {client_auth: session.getM()},
success: success