add clear channel rpc
This commit is contained in:
@@ -945,6 +945,11 @@ define([
|
||||
common.getPinnedUsage(todo);
|
||||
};
|
||||
|
||||
common.clearOwnedChannel = function (channel, cb) {
|
||||
if (!pinsReady()) { return void cb('RPC_NOT_READY'); }
|
||||
rpc.clearOwnedChannel(channel, cb);
|
||||
};
|
||||
|
||||
common.uploadComplete = function (cb) {
|
||||
if (!pinsReady()) { return void cb('RPC_NOT_READY'); }
|
||||
rpc.uploadComplete(cb);
|
||||
|
||||
@@ -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); }
|
||||
|
||||
Reference in New Issue
Block a user