Show notification if reboot is required
This commit is contained in:
@@ -944,6 +944,13 @@ angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'N
|
||||
}).error(defaultErrorHandler(callback));
|
||||
};
|
||||
|
||||
Client.prototype.isRebootRequired = function (callback) {
|
||||
get('/api/v1/cloudron/reboot').success(function(data, status) {
|
||||
if (status !== 200 || typeof data !== 'object') return callback(new ClientError(status, data));
|
||||
callback(null, data.rebootRequired);
|
||||
}).error(defaultErrorHandler(callback));
|
||||
};
|
||||
|
||||
Client.prototype.reboot = function (callback) {
|
||||
post('/api/v1/cloudron/reboot').success(function(data, status) {
|
||||
if (status !== 202 || typeof data !== 'object') return callback(new ClientError(status, data));
|
||||
|
||||
Reference in New Issue
Block a user