From 2d24b1fe1918ad96df4469f8902c3ddcb9bda5f9 Mon Sep 17 00:00:00 2001 From: kaeff Date: Wed, 9 Sep 2015 01:13:34 +0200 Subject: Allow extra signup params from account For the feature/invite-codes in leap_web, we need to be able to pass an extra parameter (the invite code) from the signup form to the server. This approach allows the consumer of SRP to specify a custom implementation of Account that returns arbitrary `loginParams`, and Session will pass them on so that they become part of the XHR. - Split session.signup into signup and update to restrict extra params to signup only --- src/jqueryRest.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/jqueryRest.js') diff --git a/src/jqueryRest.js b/src/jqueryRest.js index 103f700..0c58eb2 100644 --- a/src/jqueryRest.js +++ b/src/jqueryRest.js @@ -11,7 +11,7 @@ srp.remote = (function(){ url: "/1/users/" + session.id() + ".json", type: 'PUT', headers: { Authorization: 'Token token="' + token + '"' }, - data: {user: session.signup() } + data: {user: session.update() } }); } -- cgit v1.2.3