mkAsync getFileSize and getChannelList

pull/1/head
yflory 5 years ago
parent cf298ccd89
commit 195de903e3

@ -228,13 +228,15 @@ var truthyKeys = function (O) {
}); });
}; };
var getChannelList = function (Env, publicKey, cb) { var getChannelList = function (Env, publicKey, _cb) {
var cb = Util.once(Util.mkAsync(_cb));
loadUserPins(Env, publicKey, function (pins) { loadUserPins(Env, publicKey, function (pins) {
cb(truthyKeys(pins)); cb(truthyKeys(pins));
}); });
}; };
var getFileSize = function (Env, channel, cb) { var getFileSize = function (Env, channel, _cb) {
var cb = Util.once(Util.mkAsync(_cb));
if (!isValidId(channel)) { return void cb('INVALID_CHAN'); } if (!isValidId(channel)) { return void cb('INVALID_CHAN'); }
if (channel.length === 32) { if (channel.length === 32) {
if (typeof(Env.msgStore.getChannelSize) !== 'function') { if (typeof(Env.msgStore.getChannelSize) !== 'function') {

Loading…
Cancel
Save