new getDeletedPads rpc

This commit is contained in:
ansuz
2018-01-29 12:40:09 +01:00
parent 5089f1206d
commit f134f11b73
3 changed files with 73 additions and 14 deletions

View File

@@ -145,7 +145,22 @@ define([
if (response && response.length) {
cb(void 0, response[0]);
} else {
cb();
cb('INVALID_RESPONSE');
}
});
};
exp.removeOwnedChannel = function (channel, cb) {
if (typeof(channel) !== 'string' || channel.length !== 32) {
// can't use this on files because files can't be owned...
return void cb('INVALID_ARGUMENTS');
}
rpc.send('REMOVE_OWNED_CHANNEL', channel, function (e, response) {
if (e) { return void cb(e); }
if (response && response.length) {
cb(void 0, response[0]); // I haven't tested this...
} else {
cb('INVALID_RESPONSE');
}
});
};