add basic repository support
This commit is contained in:
@@ -3326,10 +3326,13 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout
|
||||
else this._fetchingAppstoreAppsListener.push(callback);
|
||||
};
|
||||
|
||||
Client.prototype.getAppstoreApps = function (callback) {
|
||||
Client.prototype.getAppstoreApps = function (repository, callback) {
|
||||
var that = this;
|
||||
|
||||
get('/api/v1/appstore/apps', null, function (error, data, status) {
|
||||
callback = callback || function () {};
|
||||
repository = repository || 'core';
|
||||
|
||||
get('/api/v1/appstore/apps?repository=' + repository, null, function (error, data, status) {
|
||||
if (error) return callback(error);
|
||||
if (status !== 200) return callback(new ClientError(status, data));
|
||||
|
||||
@@ -3339,10 +3342,12 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout
|
||||
});
|
||||
};
|
||||
|
||||
Client.prototype.getAppstoreAppsFast = function (callback) {
|
||||
Client.prototype.getAppstoreAppsFast = function (repository, callback) {
|
||||
if (this._appstoreAppCache.length !== 0) return callback(null, this._appstoreAppCache);
|
||||
|
||||
this.getAppstoreApps(callback);
|
||||
repository = repository || 'core';
|
||||
|
||||
this.getAppstoreApps(repository, callback);
|
||||
};
|
||||
|
||||
Client.prototype.getSubscription = function (callback) {
|
||||
|
||||
Reference in New Issue
Block a user