Add modal to edit backup label and preserveSecs

This commit is contained in:
Johannes Zellner
2022-04-05 14:41:41 +02:00
parent 2692a3bca7
commit 9c6b3a9825
3 changed files with 85 additions and 2 deletions

View File

@@ -1171,6 +1171,15 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout
}
};
Client.prototype.editBackup = function (backupId, label, preserveSecs, callback) {
post('/api/v1/backups/' + backupId, { label: label, preserveSecs: preserveSecs }, null, function (error, data, status) {
if (error) return callback(error);
if (status !== 200) return callback(new ClientError(status, data));
callback(null);
});
};
Client.prototype.startBackup = function (callback) {
post('/api/v1/backups/create', {}, null, function (error, data, status) {
if (error) return callback(error);