diff --git a/rpc.js b/rpc.js index 6e437e385..e729e4802 100644 --- a/rpc.js +++ b/rpc.js @@ -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(); }