operator: use new app update check route

This commit is contained in:
Girish Ramakrishnan
2021-09-21 19:55:48 -07:00
parent f8ed17dd58
commit a8b50642f2
2 changed files with 10 additions and 1 deletions

View File

@@ -991,6 +991,15 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout
});
};
Client.prototype.checkForAppUpdates = function (appId, callback) {
post('/api/v1/apps/' + appId + '/check_for_updates', {}, null, function (error, data, status) {
if (error) return callback(error);
if (status !== 200) return callback(new ClientError(status, data));
client.refreshConfig(callback);
});
};
Client.prototype.setAutoupdatePattern = function (pattern, callback) {
post('/api/v1/settings/autoupdate_pattern', { pattern: pattern }, null, function (error, data, status) {
if (error) return callback(error);