add clear channel rpc

This commit is contained in:
ansuz
2017-07-12 18:54:08 +02:00
parent 89af8e4472
commit eeb2ee2d17
4 changed files with 108 additions and 0 deletions

View File

@@ -136,6 +136,16 @@ define([
});
};
exp.clearOwnedChannel = function (channel, cb) {
if (typeof(channel) !== 'string' || channel.length !== 32) {
return void cb('INVALID_ARGUMENTS');
}
rpc.send('CLEAR_OWNED_CHANNEL', channel, function (e, response) {
if (e) { return cb(e); }
cb(response);
});
};
exp.uploadComplete = function (cb) {
rpc.send('UPLOAD_COMPLETE', null, function (e, res) {
if (e) { return void cb(e); }