spaces: use edition instead of setting
This commit is contained in:
@@ -123,7 +123,8 @@ angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'N
|
||||
progress: {},
|
||||
region: null,
|
||||
size: null,
|
||||
memory: 0
|
||||
memory: 0,
|
||||
edition: null
|
||||
};
|
||||
this._installedApps = [];
|
||||
this._installedAppsById = {};
|
||||
@@ -228,6 +229,7 @@ angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'N
|
||||
|
||||
// provide fallback to caas
|
||||
if (!config.provider) config.provider = 'caas';
|
||||
config.spaces = config.edition === 'spaces';
|
||||
|
||||
angular.copy(config, this._config);
|
||||
|
||||
@@ -476,20 +478,6 @@ angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'N
|
||||
}).error(defaultErrorHandler(callback));
|
||||
};
|
||||
|
||||
Client.prototype.setSpacesConfig = function (spacesConfig, callback) {
|
||||
post('/api/v1/settings/spaces_config', spacesConfig).success(function(data, status) {
|
||||
if (status !== 200) return callback(new ClientError(status, data));
|
||||
callback(null);
|
||||
}).error(defaultErrorHandler(callback));
|
||||
};
|
||||
|
||||
Client.prototype.getSpacesConfig = function (callback) {
|
||||
get('/api/v1/settings/spaces_config').success(function(data, status) {
|
||||
if (status !== 200) return callback(new ClientError(status, data));
|
||||
callback(null, data);
|
||||
}).error(defaultErrorHandler(callback));
|
||||
};
|
||||
|
||||
Client.prototype.getUpdateInfo = function (callback) {
|
||||
get('/api/v1/cloudron/update').success(function(data, status) {
|
||||
if (status !== 200) return callback(new ClientError(status, data));
|
||||
|
||||
Reference in New Issue
Block a user