provide examples of valid and invalid rpc calls

This commit is contained in:
ansuz 2017-03-15 15:56:32 +01:00
parent 7187d3c550
commit bd9efd7c04
1 changed files with 14 additions and 0 deletions

View File

@ -30,6 +30,20 @@ define([
if (e) { return void console.error(e); }
console.log(msg);
});
var list = Cryptpad.getUserChannelList();
if (list.length) {
rpc.send('GET_FILE_SIZE', list[0], function (e, msg) {
if (e) {
return void console.error(e);
}
console.log(msg);
});
}
rpc.send('GET_FILE_SIZE', 'pewpew', function (e, msg) {
if (e) { return void console.error(e); }
console.log(msg);
});
});
});
});