From 869795a70ebd12ce0b3387e8ba8003d9c9fc748e Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Tue, 7 Jun 2016 18:55:59 -0700 Subject: [PATCH] pre 0.15.0 needs manifest --- cloudron.js | 2 +- test/cloudron-autoupdate-sfo1-test.js | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/cloudron.js b/cloudron.js index f3f0b0e..a433b5c 100644 --- a/cloudron.js +++ b/cloudron.js @@ -171,7 +171,7 @@ Cloudron.prototype.installApp = function (location, manifestOrAppstoreId, portBi var data = { manifest: typeof manifestOrAppstoreId === 'object' ? manifestOrAppstoreId : null, - appStoreId: typeof manifestOrAppstoreId === 'string' ? manifestOrAppstoreId : '', + appStoreId: typeof manifestOrAppstoreId === 'string' ? manifestOrAppstoreId : manifestOrAppstoreId.id, // for pre-0.15.0 location: location, accessRestriction: null, oauthProxy: false, diff --git a/test/cloudron-autoupdate-sfo1-test.js b/test/cloudron-autoupdate-sfo1-test.js index c9cf34e..8e87b03 100644 --- a/test/cloudron-autoupdate-sfo1-test.js +++ b/test/cloudron-autoupdate-sfo1-test.js @@ -77,7 +77,9 @@ describe('Cloudron update testing', function () { var location = 'test' + (Math.random() * 10000).toFixed(); it('can install app', function () { - appId = cloudron.installApp(location, common.TESTAPP_ID + '@' + common.PREV_TESTAPP_VERSION); + var manifest = appStore.getManifest(common.TESTAPP_ID, common.PREV_TESTAPP_VERSION); + appId = cloudron.installApp(location, manifest); + // appId = cloudron.installApp(location, common.TESTAPP_ID + '@' + common.PREV_TESTAPP_VERSION); }); it('can populate the addons', function () {