use callback in 'getLimit'

pull/1/head
ansuz 8 years ago
parent 77efc2cee7
commit fa4b17e2bc

@ -509,9 +509,12 @@ var updateLimits = function (config, publicKey, cb) {
req.end(body);
};
var getLimit = function (publicKey, cb) {
var limit = limits[publicKey];
return limit && typeof limit.limit === "number" ? limit.limit : DEFAULT_LIMIT;
cb(void 0, limit && typeof(limit.limit) === "number"?
limit.limit : DEFAULT_LIMIT);
};
var safeMkdir = function (path, cb) {
@ -787,7 +790,6 @@ RPC.create = function (config /*:typeof(ConfigType)*/, cb /*:(?Error, ?Function)
Respond(void 0, dict);
});
// restricted to privileged users...
case 'UPLOAD':
if (!privileged) { return deny(); }

Loading…
Cancel
Save