diff options
author | Azul <azul@riseup.net> | 2012-11-22 12:49:46 +0100 |
---|---|---|
committer | Azul <azul@riseup.net> | 2012-11-22 12:49:46 +0100 |
commit | ac5e8d8aa7d4a69a20e20d3079691d13ed2faa66 (patch) | |
tree | 5783af5ae7ea1fb57c67b9b1746e4c26c8b99025 | |
parent | 635ea47f1c19d7985a8f5107c070ae19edf9dd54 (diff) |
using done/fail instead of success/error, handing all properties to fail
-rw-r--r-- | src/jqueryRest.js | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/jqueryRest.js b/src/jqueryRest.js index 1a60385..20692e9 100644 --- a/src/jqueryRest.js +++ b/src/jqueryRest.js @@ -28,14 +28,14 @@ srp.remote = (function(){ function signup(){ jqueryRest.register(srp.session) - .success(srp.signedUp) - .error(error) + .done(srp.signedUp) + .fail(error) }; function login(){ jqueryRest.handshake(srp.session) - .success(receiveSalts) - .error(error) + .done(receiveSalts) + .fail(error) }; function receiveSalts(response){ @@ -51,8 +51,8 @@ srp.remote = (function(){ { srp.session.calculations(response.salt, response.B); jqueryRest.authenticate(srp.session) - .success(confirmAuthentication) - .error(error); + .done(confirmAuthentication) + .fail(error); } }; @@ -68,7 +68,7 @@ srp.remote = (function(){ // The server will send error messages as json alongside // the http error response. - function error(xhr) + function error(xhr, text, thrown) { srp.error($.parseJSON(xhr.responseText)) }; |