diff options
author | Kegan Dougal <kegan@matrix.org> | 2014-10-06 14:52:46 +0100 |
---|---|---|
committer | Kegan Dougal <kegan@matrix.org> | 2014-10-06 14:52:46 +0100 |
commit | 3ef2c946d58034173f4fb54b4708ac108f1cf3f7 (patch) | |
tree | d4a78d8714cbe156bfd7bc615fd6e473bc838c0c | |
parent | Add more section headings. (diff) | |
download | synapse-3ef2c946d58034173f4fb54b4708ac108f1cf3f7.tar.xz |
Update JSFiddles/how-to to support the new registration format.
-rw-r--r-- | docs/client-server/howto.rst | 2 | ||||
-rw-r--r-- | jsfiddles/example_app/demo.js | 2 | ||||
-rw-r--r-- | jsfiddles/register_login/demo.js | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/docs/client-server/howto.rst b/docs/client-server/howto.rst index ec941edddd..9913e8db1e 100644 --- a/docs/client-server/howto.rst +++ b/docs/client-server/howto.rst @@ -31,7 +31,7 @@ Registration The aim of registration is to get a user ID and access token which you will need when accessing other APIs:: - curl -XPOST -d '{"user_id":"example", "password":"wordpass"}' "http://localhost:8008/_matrix/client/api/v1/register" + curl -XPOST -d '{"user":"example", "password":"wordpass", "type":"m.login.password"}' "http://localhost:8008/_matrix/client/api/v1/register" { "access_token": "QGV4YW1wbGU6bG9jYWxob3N0.AqdSzFmFYrLrTmteXc", diff --git a/jsfiddles/example_app/demo.js b/jsfiddles/example_app/demo.js index ad79fcca26..13c9c2b339 100644 --- a/jsfiddles/example_app/demo.js +++ b/jsfiddles/example_app/demo.js @@ -110,7 +110,7 @@ $('.register').live('click', function() { url: "http://localhost:8008/_matrix/client/api/v1/register", type: "POST", contentType: "application/json; charset=utf-8", - data: JSON.stringify({ user_id: user, password: password }), + data: JSON.stringify({ user: user, password: password, type: "m.login.password" }), dataType: "json", success: function(data) { onLoggedIn(data); diff --git a/jsfiddles/register_login/demo.js b/jsfiddles/register_login/demo.js index fffa9e0551..2e6957b631 100644 --- a/jsfiddles/register_login/demo.js +++ b/jsfiddles/register_login/demo.js @@ -14,7 +14,7 @@ $('.register').live('click', function() { url: "http://localhost:8008/_matrix/client/api/v1/register", type: "POST", contentType: "application/json; charset=utf-8", - data: JSON.stringify({ user_id: user, password: password }), + data: JSON.stringify({ user: user, password: password, type: "m.login.password" }), dataType: "json", success: function(data) { showLoggedIn(data); |