mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-07-31 03:18:41 -04:00
Fix JSFiddles to work with the new C-S API.
This commit is contained in:
parent
339dd3dc6c
commit
1cdc29e260
6 changed files with 93 additions and 81 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue