Replace addon start/stop with restart

This commit is contained in:
Johannes Zellner
2018-11-21 16:14:02 +01:00
parent 77d29c3728
commit 158514f334
3 changed files with 5 additions and 21 deletions
+2 -9
View File
@@ -700,15 +700,8 @@ angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'N
}).error(defaultErrorHandler(callback));
};
Client.prototype.startAddon = function (addonName, callback) {
post('/api/v1/addons/' + addonName + '/start').success(function (data, status) {
if (status !== 202) return callback(new ClientError(status, data));
callback(null);
}).error(defaultErrorHandler(callback));
};
Client.prototype.stopAddon = function (addonName, callback) {
post('/api/v1/addons/' + addonName + '/stop').success(function (data, status) {
Client.prototype.restartAddon = function (addonName, callback) {
post('/api/v1/addons/' + addonName + '/restart').success(function (data, status) {
if (status !== 202) return callback(new ClientError(status, data));
callback(null);
}).error(defaultErrorHandler(callback));