diff options
author | Kegan Dougal <kegan@matrix.org> | 2014-08-29 15:01:46 +0100 |
---|---|---|
committer | Kegan Dougal <kegan@matrix.org> | 2014-08-29 15:01:55 +0100 |
commit | 1cdc29e2602a17e156babb9c8a35f96a1f53a174 (patch) | |
tree | ed00e0a5e03a7cb6c3471354e5b477dbfb77c454 /jsfiddles/register_login | |
parent | Update API swagger JSON to default to POSTs not PUTs when describing the API. (diff) | |
download | synapse-1cdc29e2602a17e156babb9c8a35f96a1f53a174.tar.xz |
Fix JSFiddles to work with the new C-S API.
Diffstat (limited to 'jsfiddles/register_login')
-rw-r--r-- | jsfiddles/register_login/demo.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/jsfiddles/register_login/demo.js b/jsfiddles/register_login/demo.js index 1644f76ac7..270a96786c 100644 --- a/jsfiddles/register_login/demo.js +++ b/jsfiddles/register_login/demo.js @@ -45,7 +45,7 @@ $('.login').live('click', function() { var user = $("#userLogin").val(); var password = $("#passwordLogin").val(); $.getJSON("http://localhost:8080/matrix/client/api/v1/login", function(data) { - if (data.type !== "m.login.password") { + if (data.flows[0].type !== "m.login.password") { alert("I don't know how to login with this type: " + data.type); return; } @@ -60,7 +60,7 @@ $('.logout').live('click', function() { }); $('.testToken').live('click', function() { - var url = "http://localhost:8080/matrix/client/api/v1/im/sync?access_token=" + accountInfo.access_token + "&from=END&to=START&limit=1"; + var url = "http://localhost:8080/matrix/client/api/v1/initialSync?access_token=" + accountInfo.access_token + "&limit=1"; $.getJSON(url, function(data) { $("#imSyncText").text(JSON.stringify(data, undefined, 2)); }).fail(function(err) { |