Update and return the storage limit

This commit is contained in:
yflory
2017-05-11 16:12:44 +02:00
parent b76dcba1d6
commit 57ee7de7d4
4 changed files with 94 additions and 6 deletions

View File

@@ -121,6 +121,29 @@ define([
});
};
// Update the limit value for all the users and return the limit for your publicKey
exp.updatePinLimits = function (cb) {
rpc.send('UPDATE_LIMITS', undefined, function (e, response) {
if (e) { return void cb(e); }
if (response && typeof response === "number") {
cb (void 0, response);
} else {
cb('INVALID_RESPONSE');
}
});
};
// Get the storage limit associated with your publicKey
exp.getLimit = function (cb) {
rpc.send('GET_LIMIT', undefined, function (e, response) {
if (e) { return void cb(e); }
if (response && typeof response === "number") {
cb (void 0, response);
} else {
cb('INVALID_RESPONSE');
}
});
};
cb(e, exp);
});
};