Add settings UI to enable unstable apps listing

This commit is contained in:
Johannes Zellner
2019-04-27 22:38:09 +02:00
parent 1629be3788
commit 0226a5603d
3 changed files with 85 additions and 0 deletions

View File

@@ -544,6 +544,22 @@ angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'N
});
};
Client.prototype.setUnstableAppsConfig = function (enabled, callback) {
post('/api/v1/settings/unstable_apps', { enabled: enabled }, null, function (error, data, status) {
if (error) return callback(error);
if (status !== 200) return callback(new ClientError(status, data));
callback(null);
});
};
Client.prototype.getUnstableAppsConfig = function (callback) {
get('/api/v1/settings/unstable_apps', null, function (error, data, status) {
if (error) return callback(error);
if (status !== 200) return callback(new ClientError(status, data));
callback(null, data.enabled);
});
};
Client.prototype.getUpdateInfo = function (callback) {
get('/api/v1/cloudron/update', null, function (error, data, status) {
if (error) return callback(error);