Add a button to check updates instantly

Part of #293
This commit is contained in:
Girish Ramakrishnan
2017-04-12 18:06:18 -07:00
parent 1029402d1e
commit 1f55bb52fc
3 changed files with 29 additions and 6 deletions

View File

@@ -432,6 +432,13 @@ angular.module('Application').service('Client', ['$http', 'md5', 'Notification',
}).error(defaultErrorHandler(callback));
};
Client.prototype.checkForUpdates = function (callback) {
post('/api/v1/cloudron/check_for_updates', { }).success(function(data, status) {
if (status !== 200) return callback(new ClientError(status, data));
callback(null);
}).error(defaultErrorHandler(callback));
};
Client.prototype.getAutoupdatePattern = function (callback) {
get('/api/v1/settings/autoupdate_pattern').success(function(data, status) {
if (status !== 200) return callback(new ClientError(status, data));