Use new exec API

This commit is contained in:
Girish Ramakrishnan
2022-05-16 11:37:35 -07:00
parent 64ea742a62
commit 6b70aaf123
2 changed files with 33 additions and 18 deletions
+9
View File
@@ -786,6 +786,15 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout
});
};
Client.prototype.createExec = function (id, options, callback) {
post('/api/v1/apps/' + id + '/exec', options, null, function (error, data, status) {
if (error) return callback(error);
if (status !== 200) return callback(new ClientError(status, data));
callback(null, data.id);
});
};
Client.prototype.version = function (callback) {
get('/api/v1/cloudron/status', null, function (error, data, status) {
if (error) return callback(error);