move updater routes and settings under /api/v1/updater
This commit is contained in:
@@ -1236,7 +1236,7 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout
|
||||
Client.prototype.getUpdateInfo = function (callback) {
|
||||
if (!this._userInfo.isAtLeastAdmin) return callback(new Error('Not allowed'));
|
||||
|
||||
get('/api/v1/cloudron/update', null, function (error, data, status) {
|
||||
get('/api/v1/updater/updates', null, function (error, data, status) {
|
||||
if (error) return callback(error);
|
||||
if (status !== 200) return callback(new ClientError(status, data));
|
||||
|
||||
@@ -1245,7 +1245,7 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout
|
||||
};
|
||||
|
||||
Client.prototype.checkForUpdates = function (callback) {
|
||||
post('/api/v1/cloudron/check_for_updates', {}, null, function (error, data, status) {
|
||||
post('/api/v1/updater/check_for_updates', {}, null, function (error, data, status) {
|
||||
if (error) return callback(error);
|
||||
if (status !== 200) return callback(new ClientError(status, data));
|
||||
|
||||
@@ -1263,7 +1263,7 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout
|
||||
};
|
||||
|
||||
Client.prototype.setAutoupdatePattern = function (pattern, callback) {
|
||||
post('/api/v1/settings/autoupdate_pattern', { pattern: pattern }, null, function (error, data, status) {
|
||||
post('/api/v1/updater/autoupdate_pattern', { pattern: pattern }, null, function (error, data, status) {
|
||||
if (error) return callback(error);
|
||||
if (status !== 200) return callback(new ClientError(status, data));
|
||||
|
||||
@@ -1272,7 +1272,7 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout
|
||||
};
|
||||
|
||||
Client.prototype.getAutoupdatePattern = function (callback) {
|
||||
get('/api/v1/settings/autoupdate_pattern', null, function (error, data, status) {
|
||||
get('/api/v1/updater/autoupdate_pattern', null, function (error, data, status) {
|
||||
if (error) return callback(error);
|
||||
if (status !== 200) return callback(new ClientError(status, data));
|
||||
|
||||
@@ -1992,7 +1992,7 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout
|
||||
skipBackup: !!options.skipBackup
|
||||
};
|
||||
|
||||
post('/api/v1/cloudron/update', data, null, function (error, data, status) {
|
||||
post('/api/v1/updater/update', data, null, function (error, data, status) {
|
||||
if (error) return callback(error);
|
||||
if (status !== 202) return callback(new ClientError(status, data));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user