From 0eee944fb23875c6341e335a4938f60d7a130eb7 Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Thu, 5 May 2016 16:53:39 -0700 Subject: [PATCH] send port bindings in configure --- cloudron.js | 6 ++++-- test/app-flow-test.js | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/cloudron.js b/cloudron.js index 958865b..c169b77 100644 --- a/cloudron.js +++ b/cloudron.js @@ -182,8 +182,10 @@ Cloudron.prototype.installApp = function (location, manifest, portBindings) { return appId; }; -Cloudron.prototype.configureApp = function (appId, newLocation, altDomain /* optional */) { - var data = { location: newLocation, accessRestriction: null, oauthProxy: false, password: this._credentials.password }; +Cloudron.prototype.configureApp = function (appId, newLocation, altDomain /* optional */, portBindings) { + portBindings = portBindings || null; + + var data = { location: newLocation, accessRestriction: null, oauthProxy: false, password: this._credentials.password, portBindings: portBindings }; if (altDomain) data.altDomain = altDomain; diff --git a/test/app-flow-test.js b/test/app-flow-test.js index f3a8e3b..bed3fe1 100644 --- a/test/app-flow-test.js +++ b/test/app-flow-test.js @@ -93,7 +93,7 @@ describe('Application flow test', function () { it('can configure app', function () { location = location + 'x'; - cloudron.configureApp(appId, location); + cloudron.configureApp(appId, location, null /* altDomain */, { ECHO_SERVER_PORT: 5151 }); }); it('can check the addons', function () {