backups: move mount status to separate route

This commit is contained in:
Girish Ramakrishnan
2023-04-30 17:21:18 +02:00
parent 898413bfd4
commit 883915c9d3
7 changed files with 42 additions and 9 deletions

View File

@@ -1008,6 +1008,14 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout
});
};
Client.prototype.getBackupMountStatus = function (callback) {
get('/api/v1/backups/mount_status', null, function (error, data, status) {
if (error) return callback(error);
if (status !== 200) return callback(new ClientError(status, data));
callback(null, data);
});
};
Client.prototype.remountBackupStorage = function (callback) {
post('/api/v1/backups/remount', {}, null, function (error, data, status) {
if (error) return callback(error);