From e6c04ccb49f1ab0aa52265a5ea391c0af066966f Mon Sep 17 00:00:00 2001 From: ansuz Date: Tue, 23 May 2017 16:11:07 +0200 Subject: [PATCH] bump server after paying for an account --- www/auth/main.js | 5 +++++ www/common/cryptpad-common.js | 8 ++++---- www/common/pinpad.js | 4 ++-- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/www/auth/main.js b/www/auth/main.js index 032f406ba..488165911 100644 --- a/www/auth/main.js +++ b/www/auth/main.js @@ -42,6 +42,11 @@ define([ sig: sig }; } + } else if (data.cmd === 'UPDATE_LIMIT') { + return Cryptpad.updatePinLimit(function (e, limit, plan, note) { + ret.res = [limit, plan, note]; + srcWindow.postMessage(JSON.stringify(ret), domain); + }); } else { ret.error = "UNKNOWN_CMD"; } diff --git a/www/common/cryptpad-common.js b/www/common/cryptpad-common.js index 0559c1ce9..730a7984f 100644 --- a/www/common/cryptpad-common.js +++ b/www/common/cryptpad-common.js @@ -744,17 +744,17 @@ define([ common.updatePinLimit = function (cb) { if (!pinsReady()) { return void cb('[RPC_NOT_READY]'); } - rpc.updatePinLimits(function (e, limit, plan) { + rpc.updatePinLimits(function (e, limit, plan, note) { if (e) { return cb(e); } - cb(e, limit, plan); + cb(e, limit, plan, note); }); }; common.getPinLimit = function (cb) { if (!pinsReady()) { return void cb('[RPC_NOT_READY]'); } - rpc.getLimit(function (e, limit, plan) { + rpc.getLimit(function (e, limit, plan, note) { if (e) { return cb(e); } - cb(void 0, limit, plan); + cb(void 0, limit, plan, note); }); }; diff --git a/www/common/pinpad.js b/www/common/pinpad.js index dbd7c8b22..ff1a37c44 100644 --- a/www/common/pinpad.js +++ b/www/common/pinpad.js @@ -133,7 +133,7 @@ define([ rpc.send('UPDATE_LIMITS', undefined, function (e, response) { if (e) { return void cb(e); } if (response && response.length && typeof(response[0]) === "number") { - cb (void 0, response[0], response[1]); + cb (void 0, response[0], response[1], response[2]); } else { cb('INVALID_RESPONSE'); } @@ -144,7 +144,7 @@ define([ rpc.send('GET_LIMIT', undefined, function (e, response) { if (e) { return void cb(e); } if (response && response.length && typeof(response[0]) === "number") { - cb (void 0, response[0], response[1]); + cb (void 0, response[0], response[1], response[2]); } else { cb('INVALID_RESPONSE'); }