fix function signature for trimHistory RPC
This commit is contained in:
@@ -93,7 +93,15 @@ Channel.removeOwnedChannel = function (Env, safeKey, channelId, cb) {
|
||||
});
|
||||
};
|
||||
|
||||
Channel.removeOwnedChannelHistory = function (Env, channelId, unsafeKey, hash, cb) { // XXX UNSAFE
|
||||
Channel.trimHistory = function (Env, safeKey, data, cb) {
|
||||
if (!(data && typeof(data.channel) === 'string' && typeof(data.hash) === 'string' && data.hash.length === 64)) {
|
||||
return void cb('INVALID_ARGS');
|
||||
}
|
||||
|
||||
var channelId = data.channel;
|
||||
var unsafeKey = Util.unescapeKeyCharacters(safeKey);
|
||||
var hash = data.hash;
|
||||
|
||||
nThen(function (w) {
|
||||
Metadata.getMetadata(Env, channelId, w(function (err, metadata) {
|
||||
if (err) { return void cb(err); }
|
||||
|
||||
Reference in New Issue
Block a user