diff --git a/webadmin/src/js/appstore.js b/webadmin/src/js/appstore.js index 1e3cc72c9..ce812921c 100644 --- a/webadmin/src/js/appstore.js +++ b/webadmin/src/js/appstore.js @@ -63,6 +63,17 @@ angular.module('Application').service('AppStore', ['$http', 'Client', function ( }); }; + AppStore.prototype.getAppByIdAndVersion = function (appId, version, callback) { + if (Client.getConfig().apiServerOrigin === null) return callback(new AppStoreError(420, 'Enhance Your Calm')); + + $http.get(Client.getConfig().apiServerOrigin + '/api/v1/apps/' + appId + '/versions/' + version).success(function (data, status) { + if (status !== 200) return callback(new AppStoreError(status, data)); + return callback(null, data); + }).error(function (data, status) { + return callback(new AppStoreError(status, data)); + }); + }; + AppStore.prototype.getManifest = function (appId, callback) { if (Client.getConfig().apiServerOrigin === null) return callback(new AppStoreError(420, 'Enhance Your Calm')); diff --git a/webadmin/src/views/appstore.html b/webadmin/src/views/appstore.html index 5f3950c29..9eb75d6ae 100644 --- a/webadmin/src/views/appstore.html +++ b/webadmin/src/views/appstore.html @@ -88,6 +88,23 @@ + +